...

View Full Version : Problem with creating a TABLE with BOOL data type



knight fyre
04-28-2009, 08:40 PM
I keep getting a error on line 13.


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 '' at line 13

Here's my mySql code


$mysql->query("CREATE TABLE admissionData (
reservationNum INT(6) NOT NULL AUTO_INCREMENT,
guestNum INT(7) NOT NULL PRIMARY KEY AUTO_INCREMENT,
firstName VARCHAR(30) NOT NULL,
mI VARCHAR(1),
lastName VARCHAR(30) NOT NULL,
creditCard BIGINT(16),
cellNumber BIGINT(10),
homeNumber BIGINT(10),
workNumber BIGINT(10),
numOfDays SMALLINT(3),
charge FLOAT(6,2),
canceled BOOL") or die($mysql->error);

What am I doing wrong?

oesxyl
04-28-2009, 08:49 PM
I keep getting a error on line 13.



Here's my mySql code


$mysql->query("CREATE TABLE admissionData (
reservationNum INT(6) NOT NULL AUTO_INCREMENT,
guestNum INT(7) NOT NULL PRIMARY KEY AUTO_INCREMENT,
firstName VARCHAR(30) NOT NULL,
mI VARCHAR(1),
lastName VARCHAR(30) NOT NULL,
creditCard BIGINT(16),
cellNumber BIGINT(10),
homeNumber BIGINT(10),
workNumber BIGINT(10),
numOfDays SMALLINT(3),
charge FLOAT(6,2),
canceled BOOL)") or die($mysql->error);

What am I doing wrong?
at first look you miss a ')'.

best regards

knight fyre
04-28-2009, 09:00 PM
I knew it was something simple.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum