nickbunyun Posted February 1, 2008 Share Posted February 1, 2008 Error SQL query: CREATE TABLE `inventory` ( `id` int NOT NULL PRIMARY KEY '', `full_name` varchar( 100 ) NOT NULL default '', `phone_number` varchar( 20 ) NOT NULL default '', `address` text NOT NULL default '', `short_info` varchar( 150 ) NOT NULL default '', `long_info` text NOT NULL default '', `new_date` date '', `user` varchar( 20 ) NOT NULL default '', `other_info` text NOT NULL default '', ) 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 ''', `full_name` varchar(100) NOT NULL default '', `phone_number` varchar(20) N' at line 2 Quote Link to comment Share on other sites More sharing options...
AndyB Posted February 2, 2008 Share Posted February 2, 2008 CREATE TABLE `inventory` ( `id` int NOT NULL PRIMARY KEY, `full_name` varchar( 100 ) NOT NULL default '', `phone_number` varchar( 20 ) NOT NULL default '', `address` text NOT NULL default '', `short_info` varchar( 150 ) NOT NULL default '', `long_info` text NOT NULL default '', `new_date` date, `user` varchar( 20 ) NOT NULL default '', `other_info` text NOT NULL default '' ) That works Quote Link to comment Share on other sites More sharing options...
krow Posted February 7, 2008 Share Posted February 7, 2008 Error SQL query: CREATE TABLE `inventory` ( `id` int NOT NULL PRIMARY KEY '', `full_name` varchar( 100 ) NOT NULL default '', `phone_number` varchar( 20 ) NOT NULL default '', `address` text NOT NULL default '', `short_info` varchar( 150 ) NOT NULL default '', `long_info` text NOT NULL default '', `new_date` date '', `user` varchar( 20 ) NOT NULL default '', `other_info` text NOT NULL default '', <-- your problem I believe ) I don't know if you got this working or not but I marked what I believe is your problem. there is an extra comma so SQL is looking for another command. I would like to know if this fixes the problem for sure Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.