Hi!
I'm looking to update a field in a table via PHP, basically asking it to change a fields contents to 'foo' if it currently contains the word 'bar', or to change its contents to 'key' if it currently contains the word 'board'. I can't seem to get the syntax right, though.
Can someone assist me with correcting my syntax? My query is below:
mysql_select_db($database_TheBoard, $TheBoard);
$correct_columnname = "UPDATE tablename SET columnname='foo' WHERE columnname ='bar' AND columnname='key' WHERE columnname ='board'";
$Result_correct_columnname = mysql_query($correct_columnname, $TheBoard) or die("Unable to correct columnname: ".mysql_error());
Thanks!