I get the following error when running my .php file:
You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near ''feeds_list' SET 'cron' = now() WHERE 'feed_id' = '1'' at line 1
Here is the code:
$sql = mysql_query("UPDATE 'feeds_list' SET 'cron' = now() WHERE 'feed_id' = '$feed_id'") or die (mysql_error());
Thanks for helping me out
Answer
Remove the ''
around table names and column names, it should be:
UPDATE feeds_list SET cron = now() WHERE feed_id = '$feed_id'
or use a backticks (``).
No comments:
Post a Comment