Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    1

    Exclamation Unanswered: HELP: Unknown Syntax Error, Deadline Today

    The mySQL query is as follows:
    PHP Code:
    CREATE TABLE listings(

    `
    idINT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
    PROPERTY_NM CHAR15 ) ,
    BEDROOM_NB TINYTEXT) ,
    MINIMUMRENT_AT TINYINT) ,
    MAXIMUMRENT_AT TINYINT) ,
    MINIMUMBATHROOM_NB CHAR) ,
    MAXIMUMBATHROOM_NB CHAR) ,
    MINIMUMSQUAREFEET_NB TINYINT) ,
    MAXIMUMSQUAREFEET_NB TINYINT) ,
    URL_NM CHAR85 ) ,
    IMAGEURL_NM TINYTEXT54 ) ,
    COMMENT_TX TINYTEXT983 ) ,
    CONTACTCITY_NM TINYTEXT) ,
    CONTACTSTATE_CD TINYTEXT) ,
    CONTACTZIP_CD SMALLINT) ,
    COVEREDPARKING_ID TINYTEXT) ,
    GARAGEDIRECTACCESS_ID CHAR) ,
    GARAGEDETACHED_ID CHAR) ,
    ASSIGNEDPARKING_ID CHAR) ,
    GATEDCOMMUNITY_ID CHAR) ,
    ONSITEPATROL_ID CHAR) ,
    PLAYGROUND_ID CHAR) ,
    POOL_ID CHAR) ,
    JACUZZI_ID CHAR) ,
    FITNESSCENTER_ID CHAR) ,
    TENNISCOURT_ID CHAR) ,
    RACQUETBALLCOURT_ID CHAR) ,
    CLUBHOUSE_ID CHAR) ,
    BUSINESSCENTER_ID CHAR) ,
    LAUNDRYFACILITY_ID CHAR) ,
    ELEVATOR_ID CHAR) ,
    STORAGE_ID CHAR) ,
    WHEELCHAIRACCESS_ID CHAR) ,
    DOGSALLOWED_ID CHAR) ,
    CATSALLOWED_ID CHAR) ,
    FURNISHED_ID CHAR) ,
    BALCONY_ID CHAR) ,
    YARD_ID CHAR) ,
    WASHERDRYER_ID CHAR) ,
    WASHERDRYERHOOKUP_ID CHAR) ,
    INTRUSIONALARM_ID CHAR) ,
    AIRCONDITIONING_ID CHAR) ,
    CEILINGFAN_ID CHAR) ,
    REFRIGERATOR_ID CHAR) ,
    DISHWASHER_ID CHAR) ,
    GARBAGEDISPOSAL_ID CHAR) ,
    MICROWAVE_ID CHAR) ,
    HARDWOODFLOOR_ID CHAR) ,
    CARPETING_ID CHAR) ,
    FIREPLACE_ID CHAR) ,
    WALKINCLOSET_ID CHAR) ,
    VAULTEDCEILING_ID CHAR) ,
    HIGHSPEEDINTERNET_ID CHAR) ,
    CABLEREADY_ID CHAR


    MySQL said


    You have an error in your SQL syntax near '(1), MINIMUMRENT_AT TINYINT(4), MAXIMUMRENT_AT TINYINT(4), MINIMUMBATHROOM_NB CH' at line 1 
    I get the same error even if I remove the single quotes. What is the syntax error , anyone have an idea or see what I am missing?

    Thanks
    Last edited by webmedium; 12-09-03 at 14:13.

  2. #2
    Join Date
    Oct 2003
    Location
    Denver, Colorado
    Posts
    137
    You don't want to specify a length with TEXT columns:

    BEDROOM_NB TINYTEXT,

    Not

    BEDROOM_NB TINYTEXT(1),

    If you want to specify length of a character string column use

    CHAR(xx)

    instead of TEXT

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •