Jump to content

update problem


jandrews3

Recommended Posts

Can anyone tell me what is wrong with the following code:

<?
				$last_log = date("d F, Y; G:i:s");
				$query1 = "UPDATE ithf_members SET last_log = {$last_log} WHERE id = {$id}";
				mysql_query($query1) or die("Could not perform update: ".mysql_error());
?>

 

I keep getting the following error:

Could not perform update: 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 'July, 2008; 23:07:53 WHERE id = 1' at line 1

 

I tried it with each $last_log enclosed in single quotes, in brackets and without anything. The new mysql server I'm now using doesn't seem to like my older coding. Thanks!

Link to comment
https://forums.phpfreaks.com/topic/112877-update-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.