armlocker Posted March 12, 2013 Share Posted March 12, 2013 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 ErrorSQL 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 More sharing options...
Jonathon Posted March 12, 2013 Share Posted March 12, 2013 print_name VARCHAR( 60 ) DEFAULT NOT NULL , I don't think you can have a column Default to Not Null. It should be default to NULL I would guess? 2 Link to comment Share on other sites More sharing options...
armlocker Posted March 13, 2013 Author Share Posted March 13, 2013 PERFECT Thanks Jon. Link to comment Share on other sites More sharing options...
Recommended Posts