Sytax Error

mysql_query("UPDATE hostip SET time = '".date("d/m/y h:m:s")."' WHERE ipaddress = '".$ip."'");

Whats the problem in this query.... Its giving me syntax error...

Featured Replies in this Discussion


Date format is incorrect, use Y-m-d format or the mysql NOW() function.


I already used that format in insert query and it worked fine... but in update query it is giving me error. thank you for a nice suggestion to use NOW() function.

Question Answered as of 3 Years Ago by pritaeas
Isn't it about time forums rewarded their contributors?

Earn rewards points for helping others. Gain kudos. Cash out. Get better answers yourself.

It's as simple as contributing editorial or replying to discussions labeled or OP Kudos

This question has already been solved: Start a new discussion instead
Start New Discussion
View similar articles that have also been tagged: