DIM3NSION
DIM3NSION

Reputation: 1761

MYSQL string replace on column PHP

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

Answers (1)

Nicola Peluchetti
Nicola Peluchetti

Reputation: 76880

Try with an extra ' and with a closing )

$query = "UPDATE Films SET Film_Release = REPLACE(Film_Release, 'Release Date: ','')"; 

Upvotes: 2

Related Questions