Samthemist Posted February 19, 2008 Share Posted February 19, 2008 mysql_query("CREATE TABLE uploads( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), type smallint(1), url VARCHAR(120), thumbnail VARCHAR(120), status VARCHAR(120), dateadded TIMESTAMP NOT NULL, comments int(11), votes int(11), votestoday int(11) )") I'm using this code, and it works fine. Though the one row i'm having problem is dateadded. It's all correct except on Attributes under dateadded it has: "ON UPDATE CURRENT_TIMESTAMP". Is there anyway to remove stop it happening when it installs? Quote Link to comment Share on other sites More sharing options...
aschk Posted February 19, 2008 Share Posted February 19, 2008 You need to specify the behaviour. In other words dateadded TIMESTAMP DEFAULT CURRENT_TIMESTAMP will stop it from auto-updating. See http://dev.mysql.com/doc/refman/5.0/en/timestamp.html for more information on particular behavioural settings. 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.