pinochio Posted October 1, 2009 Share Posted October 1, 2009 Hi I placed this SQL statement into my php script but it says this:"Unable to create the attendees table. Error code 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 'SMALL INT NOT NULL AUTO_INCREMENT PRIMARY KEY, firstName VARCHAR(40), lastName V' at line 1" if (!$QueryResult) { $SQLstring = "CREATE TABLE $TableName (attendeeID SMALL INT NOT NULL AUTO_INCREMENT PRIMARY KEY, firstName VARCHAR(40), lastName VARCHAR(40), homeaddress VARCHAR(40), homecity VARCHAR(40),homestate VARCHAR(2),homezip VARCHAR(10), homephone VARCHAR(40),homeemail VARCHAR(40),)"; $QueryResult = @mysqli_query($DBConnect, $SQLstring) Link to comment https://forums.phpfreaks.com/topic/176205-solved-mysql/ Share on other sites More sharing options...
cags Posted October 1, 2009 Share Posted October 1, 2009 SMALLINT is all one word, not SMALL INT, I think you will also get an error message because of the comma right at the end of the query. Link to comment https://forums.phpfreaks.com/topic/176205-solved-mysql/#findComment-928580 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.