sh0wtym3 Posted October 10, 2008 Share Posted October 10, 2008 I am using the following query to insert a timestamp into my database: mysql_query("UPDATE table SET column=now() WHERE title='$title'"); Which works fine, except, the year that it inserts is 2010..? Last time I checked I'm pretty sure we're in 2008. Any ideas why this is happening? (My PC is set to 2008 if you are wondering) Link to comment https://forums.phpfreaks.com/topic/127922-php-timestamp/ Share on other sites More sharing options...
Barand Posted October 10, 2008 Share Posted October 10, 2008 is column type DATETIME Link to comment https://forums.phpfreaks.com/topic/127922-php-timestamp/#findComment-662323 Share on other sites More sharing options...
sh0wtym3 Posted October 10, 2008 Author Share Posted October 10, 2008 No, the column type is timestamp EDIT: I just tried using the column type datetime as well, but am getting the same result... Year 2010. Link to comment https://forums.phpfreaks.com/topic/127922-php-timestamp/#findComment-662324 Share on other sites More sharing options...
Barand Posted October 10, 2008 Share Posted October 10, 2008 is MySQL on another server with the wrong time? Link to comment https://forums.phpfreaks.com/topic/127922-php-timestamp/#findComment-662327 Share on other sites More sharing options...
PFMaBiSmAd Posted October 10, 2008 Share Posted October 10, 2008 And how do you know the value is wrong? What method or code are you using to show the value? Link to comment https://forums.phpfreaks.com/topic/127922-php-timestamp/#findComment-662332 Share on other sites More sharing options...
sh0wtym3 Posted October 10, 2008 Author Share Posted October 10, 2008 PFM: I'm not showing the value via php script, I'm simply looking at it in my database (I have phpmyadmin) Barand: That's possible, because I don't run mysql on my computer, I'm using a hosting company Link to comment https://forums.phpfreaks.com/topic/127922-php-timestamp/#findComment-662334 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.