1.11M Members

Sytax Error

 
0
 
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...

 
1
 

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

 
0
 

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 2 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

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