Gatsu Posted March 6, 2010 Report Share Posted March 6, 2010 I use this which I copied from your example with few edits to fit my purposes: CREATE TABLE tickets(id int NOT NULL auto_increment,ticket int NOT NULL,timea datetime NOT NULL DEAFULT NOW(),PRIMARY KEY (id)) I get thise error:#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEAFULT NOW(), PRIMARY KEY (id) )' at line 5CREATE TABLE tickets(id int NOT NULL AUTO_INCREMENT ,ticket int NOT NULL ,timea datetime NOT NULL DEAFULTNOW( ) ,PRIMARY KEY ( id ))Why? Link to comment Share on other sites More sharing options...
Synook Posted March 7, 2010 Report Share Posted March 7, 2010 You can't use functions as DEFAULT values[1]. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now