I have a mysql table with close to 3000 entries in it, some of the entries have the ‘&’ character and i want to replace it with ‘&’, I have tried
$sql = mysql_query(‘SELECT column FROM table’);
[code]$i=0;
while($row=mysql_fetch_assoc($sql)) {
$string = preg_replace("&","&",$i);
mysql_query(“UPDATE table SET column = ‘$string’ WHERE id = ‘$i’”);
if($do) { echo ‘done
’; } else { echo ‘failed
’; }
$i++;
}[/code]
But this returns failed
Does anyone know of a way to do this