shadiadiph Posted March 2, 2009 Share Posted March 2, 2009 I have the following sql insert statement $updatesql ="update tblclientdetails set loginfailed ='0', logged='Yes', timeslogged = timeslogged +1, dtlogged = now(), tmlogged = now() where username='$username'"; dtlogged is set as a DATE field in the database. tmlogged is set as a TIME field in the database. it is writing dtlogged fine but tmlogged is not it is always showing 00:00:00 any ideas? Link to comment https://forums.phpfreaks.com/topic/147532-solved-inserting-now-isnt-working/ Share on other sites More sharing options...
shadiadiph Posted March 2, 2009 Author Share Posted March 2, 2009 mm thought i had solved it but the time is now saving as 838:59:59 ? ? Link to comment https://forums.phpfreaks.com/topic/147532-solved-inserting-now-isnt-working/#findComment-774471 Share on other sites More sharing options...
Yesideez Posted March 2, 2009 Share Posted March 2, 2009 Try replacing NOW with CURDATE and CURTIME - see if that works. Link to comment https://forums.phpfreaks.com/topic/147532-solved-inserting-now-isnt-working/#findComment-774487 Share on other sites More sharing options...
shadiadiph Posted March 2, 2009 Author Share Posted March 2, 2009 changing just curtime() produce 00:00:00 changing both of them returned the current date ok and curtime as 838:59:59 same problem as before. Link to comment https://forums.phpfreaks.com/topic/147532-solved-inserting-now-isnt-working/#findComment-774519 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.