Jump to content

[SOLVED] MySQL


pinochio

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.