interimhelp Posted September 11, 2008 Share Posted September 11, 2008 mysql_query("UPDATE ". USERS_TABLE ." SET last_login = 'TIMESTAMP_CURRENT()' WHERE uid = '$_SESSION[uid]'"); I've used "NOW()" to replace "TIMESTAMP_CURRENT()" and also have changed the database type to text and sent "text" which it does update but I cannot get it to update with the date and time it only sends all zeros...any ideas??? Quote Link to comment Share on other sites More sharing options...
fenway Posted September 12, 2008 Share Posted September 12, 2008 IMESTAMP_CURRENT() isn't a function that I've ever heard of... I think you mean to update the column definition. Quote Link to comment Share on other sites More sharing options...
interimhelp Posted September 12, 2008 Author Share Posted September 12, 2008 Yeah im a intern trying to find out why the timestamp isn't updating upon update Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 12, 2008 Share Posted September 12, 2008 Is it the first TIMESTAMP column in the table? Is it set to ON UPDATE CURRENT_TIMESTAMP? If yes, and yes, then you don't need to mention this column in update query. It will update by itself. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.