Jump to content

MySQL NOW() giving blank result


Fsoft

Recommended Posts

Hey,

 

I am using this query

$querywritingguest = mysql_query("INSERT INTO onlineguests (guestip, guest_active_time) VALUES (\"$guestip\",'NOW()')");

 

This is query I am writing in my database for guest and NOW() is used because after a particular time, I will be deleting old entries, but problem is that now is giving a blank result like this :

 

0000-00-00 00:00:00

 

In database we have two fields, guestip (varchar) and guest_active_time (TIMESTAMP)..

 

I don't get what Am I doing wrong :(

 

Please help me.. Thanks!

 

FAISAL!

Link to comment
https://forums.phpfreaks.com/topic/128951-mysql-now-giving-blank-result/
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.