Jump to content


Photo

HELP: DEADLINE TODAY, Syntax Error


  • Please log in to reply
2 replies to this topic

#1 webmedium

webmedium
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationSan Antonio, TX

Posted 09 December 2003 - 06:33 PM

The mySQL query is as follows:


CREATE TABLE listings(`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,PROPERTY_NM CHAR( 15 ) ,BEDROOM_NB TINYTEXT( 1 ) ,MINIMUMRENT_AT TINYINT( 4 ) ,MAXIMUMRENT_AT TINYINT( 4 ) ,MINIMUMBATHROOM_NB CHAR( 1 ) ,MAXIMUMBATHROOM_NB CHAR( 1 ) ,MINIMUMSQUAREFEET_NB TINYINT( 4 ) ,MAXIMUMSQUAREFEET_NB TINYINT( 4 ) ,URL_NM CHAR( 85 ) ,IMAGEURL_NM TINYTEXT( 54 ) ,COMMENT_TX TINYTEXT( 983 ) ,CONTACTCITY_NM TINYTEXT( 7 ) ,CONTACTSTATE_CD TINYTEXT( 2 ) ,CONTACTZIP_CD SMALLINT( 5 ) ,COVEREDPARKING_ID TINYTEXT( 1 ) ,GARAGEDIRECTACCESS_ID CHAR( 1 ) ,GARAGEDETACHED_ID CHAR( 1 ) ,ASSIGNEDPARKING_ID CHAR( 1 ) ,GATEDCOMMUNITY_ID CHAR( 1 ) ,ONSITEPATROL_ID CHAR( 1 ) ,PLAYGROUND_ID CHAR( 1 ) ,POOL_ID CHAR( 1 ) ,JACUZZI_ID CHAR( 1 ) ,FITNESSCENTER_ID CHAR( 1 ) ,TENNISCOURT_ID CHAR( 1 ) ,RACQUETBALLCOURT_ID CHAR( 1 ) ,CLUBHOUSE_ID CHAR( 1 ) ,BUSINESSCENTER_ID CHAR( 1 ) ,LAUNDRYFACILITY_ID CHAR( 1 ) ,ELEVATOR_ID CHAR( 1 ) ,STORAGE_ID CHAR( 1 ) ,WHEELCHAIRACCESS_ID CHAR( 1 ) ,DOGSALLOWED_ID CHAR( 1 ) ,CATSALLOWED_ID CHAR( 1 ) ,FURNISHED_ID CHAR( 1 ) ,BALCONY_ID CHAR( 1 ) ,YARD_ID CHAR( 1 ) ,WASHERDRYER_ID CHAR( 1 ) ,WASHERDRYERHOOKUP_ID CHAR( 1 ) ,INTRUSIONALARM_ID CHAR( 1 ) ,AIRCONDITIONING_ID CHAR( 1 ) ,CEILINGFAN_ID CHAR( 1 ) ,REFRIGERATOR_ID CHAR( 1 ) ,DISHWASHER_ID CHAR( 1 ) ,GARBAGEDISPOSAL_ID CHAR( 1 ) ,MICROWAVE_ID CHAR( 1 ) ,HARDWOODFLOOR_ID CHAR( 1 ) ,CARPETING_ID CHAR( 1 ) ,FIREPLACE_ID CHAR( 1 ) ,WALKINCLOSET_ID CHAR( 1 ) ,VAULTEDCEILING_ID CHAR( 1 ) ,HIGHSPEEDINTERNET_ID CHAR( 1 ) ,CABLEREADY_ID CHAR( 1 ) ) 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 am not sure what the error is, it is the same if I add single quotes around the field names or not....I don\'t know what I am not seeing...

Thanks

#2 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 09 December 2003 - 06:48 PM

Try this

CREATE TABLE listings( id INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY , PROPERTY_NM CHAR(15) , BEDROOM_NB TINYTEXT, MINIMUMRENT_AT TINYINT(4) , MAXIMUMRENT_AT TINYINT(4) , MINIMUMBATHROOM_NB CHAR( 1 ) , MAXIMUMBATHROOM_NB CHAR( 1 ) , MINIMUMSQUAREFEET_NB TINYINT( 4 ) , MAXIMUMSQUAREFEET_NB TINYINT( 4 ) , URL_NM CHAR( 85 ) , IMAGEURL_NM TINYTEXT , COMMENT_TX TINYTEXT, CONTACTCITY_NM TINYTEXT , CONTACTSTATE_CD TINYTEXT, CONTACTZIP_CD SMALLINT( 5 ) , COVEREDPARKING_ID TINYTEXT , GARAGEDIRECTACCESS_ID CHAR( 1 ) , GARAGEDETACHED_ID CHAR( 1 ) , ASSIGNEDPARKING_ID CHAR( 1 ) , GATEDCOMMUNITY_ID CHAR( 1 ) , ONSITEPATROL_ID CHAR( 1 ) , PLAYGROUND_ID CHAR( 1 ) , POOL_ID CHAR( 1 ) , JACUZZI_ID CHAR( 1 ) , FITNESSCENTER_ID CHAR( 1 ) , TENNISCOURT_ID CHAR( 1 ) , RACQUETBALLCOURT_ID CHAR( 1 ) , CLUBHOUSE_ID CHAR( 1 ) , BUSINESSCENTER_ID CHAR( 1 ) , LAUNDRYFACILITY_ID CHAR( 1 ) , ELEVATOR_ID CHAR( 1 ) , STORAGE_ID CHAR( 1 ) , WHEELCHAIRACCESS_ID CHAR( 1 ) , DOGSALLOWED_ID CHAR( 1 ) , CATSALLOWED_ID CHAR( 1 ) , FURNISHED_ID CHAR( 1 ) , BALCONY_ID CHAR( 1 ) , YARD_ID CHAR( 1 ) , WASHERDRYER_ID CHAR( 1 ) , WASHERDRYERHOOKUP_ID CHAR( 1 ) , INTRUSIONALARM_ID CHAR( 1 ) , AIRCONDITIONING_ID CHAR( 1 ) , CEILINGFAN_ID CHAR( 1 ) , REFRIGERATOR_ID CHAR( 1 ) , DISHWASHER_ID CHAR( 1 ) , GARBAGEDISPOSAL_ID CHAR( 1 ) , MICROWAVE_ID CHAR( 1 ) , HARDWOODFLOOR_ID CHAR( 1 ) , CARPETING_ID CHAR( 1 ) , FIREPLACE_ID CHAR( 1 ) , WALKINCLOSET_ID CHAR( 1 ) , VAULTEDCEILING_ID CHAR( 1 ) , HIGHSPEEDINTERNET_ID CHAR( 1 ) , CABLEREADY_ID CHAR( 1 ) )

Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks

#3 webmedium

webmedium
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationSan Antonio, TX

Posted 09 December 2003 - 06:56 PM

That worked, Ididnt eve notice I had the byte values after the text, see what happens when you work too much :D THank, that makes the site work all correctly know




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users