Problem with SQL syntax (probably simple)
Posted
by Bryan Folds
on Stack Overflow
See other posts from Stack Overflow
or by Bryan Folds
Published on 2010-04-17T17:11:36Z
Indexed on
2010/04/17
17:23 UTC
Read the original article
Hit count: 346
I'm doing some custom database work for a module for Drupal and I get the following SQL error when trying to create my table:
user warning: 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 'DEFAULT NULL,
roomsINT DEFAULT NULL,adultsINT DEFAULT NULL,children' at line 14 query: CREATE TABLE dr_enquiry (eIdINT unsigned NOT NULL auto_increment,eKeyVARCHAR(16) NOT NULL,dateSentINT NOT NULL DEFAULT 0,statusVARCHAR(30) NOT NULL DEFAULT 'Unanswered',custNameVARCHAR(50) NOT NULL,custEmailVARCHAR(200) NOT NULL,custPhoneVARCHAR(25) NOT NULL,custCountryVARCHAR(40) NOT NULL,custIPVARCHAR(11) DEFAULT NULL,offerNameVARCHAR(100) NOT NULL,offerURLVARCHAR(200) NOT NULL,arrivalDATETIME DEFAULT NULL,departureDEFAULT NULL,roomsINT DEFAULT NULL,adultsINT DEFAULT NULL,childrenINT DEFAULT NULL,childAgesVARCHAR(32) DEFAULT NULL,toddlersINT DEFAULT NULL,toddlerAgesVARCHAR(32) DEFAULT NULL,cateringVARCHAR(255) DEFAULT NULL,commentsVARCHAR(255) DEFAULT NULL,agentVARCHAR(100) DEFAULT NULL,voucherVARCHAR(100) DEFAULT NULL, PRIMARY KEY (eId) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/travelco/public_html/includes/database.inc on line 550.
© Stack Overflow or respective owner