Jump to content
Larry Ullman's Book Forums

Recommended Posts

Can anyone see why PHPMYADMIN is spitting out this error message:

 

MySQL said: 

#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 'NOT NULL,
price DECIMAL(6,2) UNSIGNED NOT NULL,
size VARCHAR(60) DEFAULT NULL,' at line 5

 

Error
SQL query:

CREATE TABLE prints(

print_id INT UNSIGNED NOT NULL AUTO_INCREMENT ,
artist_id INT UNSIGNED NOT NULL ,
print_name VARCHAR( 60 ) DEFAULT NOT NULL ,
price DECIMAL( 6, 2 ) UNSIGNED NOT NULL ,
size VARCHAR( 60 ) DEFAULT NULL ,
description VARCHAR( 255 ) DEFAULT NULL ,
image_name VARCHAR( 60 ) NOT NULL ,
PRIMARY KEY ( print_id ) ,
INDEX ( artist_id ) ,
INDEX ( print_name ) ,
INDEX ( price )
) ENGINE = MYISAM ;

 

 

Much appreciated

Link to comment
Share on other sites

 Share

×
×
  • Create New...