Reputation: 1761
Hi i want to do the equivalent of a string replace in php through mysql. My column has the string format "Release Date: Thursday 20th May 2012" I want to release the text release date:. I have tried this but with no avail
$query = ("UPDATE Films SET Film_Release = REPLACE(Film_Release, 'Release Date: ','");
$runquery = mysql_query($query);
Thanks guys
Upvotes: 1
Views: 992
Reputation: 76880
Try with an extra '
and with a closing )
$query = "UPDATE Films SET Film_Release = REPLACE(Film_Release, 'Release Date: ','')";
Upvotes: 2