smstromb Posted July 15, 2008 Share Posted July 15, 2008 This should be an easy fix but my eyes just cannot spot the error, it's driving me crazy: $sql = "CREATE TABLE $username ( id int NOT NULL AUTO_INCREMENT, PRIMARY KEY (id), FlightNumber varchar(5) NOT NULL, Date date NOT NULL, Approach varchar(100) NOT NULL, IMC smallint(6) NOT NULL, NightLandings smallint(6) NOT NULL, NightTime smallint(6) NOT NULL, Depart varchar(5) NOT NULL, Arrive varchar(5) NOT NULL, BlockTime smallint(6) NOT NULL, Aircraft varchar(10) NOT NULL, AircraftType varchar(10) NOT NULL, )"; mysql_query($sql,$this->connection); Quote Link to comment Share on other sites More sharing options...
rhodesa Posted July 15, 2008 Share Posted July 15, 2008 Date is a reserved word, don't use it as a column name ....also, this should be posted in mysql help Quote Link to comment Share on other sites More sharing options...
smstromb Posted July 15, 2008 Author Share Posted July 15, 2008 Ah, Sorry. Was in such a rush I didn't even look for the mysql forum. Also, I changed Date to theDate and it's still giving me problems. Quote Link to comment Share on other sites More sharing options...
.josh Posted July 15, 2008 Share Posted July 15, 2008 mysql_query($sql,$this->connection) or die(mysql_error()); Quote Link to comment Share on other sites More sharing options...
smstromb Posted July 15, 2008 Author Share Posted July 15, 2008 problem solved. There's an extra comma right before the closing parenthesis. 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.