Replace sql field using PHP

Soldato
Joined
16 Oct 2007
Posts
7,434
Location
UK
Can anyone help? I'm trying to use a script to replace a database value

PHP:
UPDATE data SET field = replace(MMSI,'235095793','Britannia');

Is what I have at the moment.
In the table 'data', I want to replace the value '235095793' with 'Britannia' from the column 'MMSI'

But it gives me a

Parse error: syntax error, unexpected T_STRING in /home/mission/public_html/ais/import.php on line 97

Any ideas? Thank you
 
Back
Top Bottom