Fsoft Posted October 18, 2008 Share Posted October 18, 2008 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 More sharing options...
zenag Posted October 18, 2008 Share Posted October 18, 2008 mysql_query("INSERT INTO onlineguests (guestip, guest_active_time) VALUES (\"$guestip\",NOW())"); REMOVE SINGLE QUOTE FOR now() Link to comment https://forums.phpfreaks.com/topic/128951-mysql-now-giving-blank-result/#findComment-668543 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.