Jump to content

MySQL Table Creation Problem


Samthemist

Recommended Posts

	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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.