hey guys, i dont understand why my code updated most of the records. all its doing is taking out the <br /> 's. the counter is saying there's more, which there definately is, but why would str_replace not delete the rest of the <br /> 's? im stumped... thanks guys!
<?
include "common_db.inc";
$link_id = db_connect($default_dbname);
$query = mysql_query("SELECT CCID, comment FROM comments_calls2 WHERE comment LIKE '%<br />%'", $link_id);
$counter = 1;
while ($result = mysql_fetch_array($query))
{
echo $counter;
$comment = str_replace('<br />', '', $result[comment]);
$query2 = mysql_query("UPDATE comments_calls2 SET comment='$comment' WHERE CCID='$result[CCID]'", $link_id);
$counter++;
}
?>