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? Link to comment https://forums.phpfreaks.com/topic/91868-mysql-table-creation-problem/ 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. Link to comment https://forums.phpfreaks.com/topic/91868-mysql-table-creation-problem/#findComment-470603 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.