List:General Discussion« Previous MessageNext Message »
From:Rhino Date:December 31 2006 10:35pm
Subject:Re: SQL syntax
View as plain text  
----- Original Message ----- 
From: "Scott Yamahata" <scott_yamahata@stripped>
To: <mysql@stripped>
Sent: Friday, December 29, 2006 1:29 AM
Subject: SQL syntax


> Hi, I'm getting the following error message:
>
> 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 ' enabled = 
> '1'' at line 3INSERT INTO clf_cities SET cityname = 'Santa Barbara', 
> countryid = , enabled = '1'
>
> and can't quite figure out what it means.  Any help is greatly 
> appreciated.
>

Someone may have replied to you by now so I apologize if this is old news 
but I think the problem _precedes_

     enabled = '1'

Take a look at the SQL just BEFORE that where you wrote:

    countryid = ,

That is surely not valid SQL in any dialect of SQL I have ever seen. You 
need an appropriate value before the comma, such as:

    countryid = 7,

or

    countryid = '7',


If you don't want to assign a value to countryid, just omit the entire 
'countryid =,' altogether.

--
Rhino

Thread
Filling blanks on SELECTAshley M. Kirchner28 Dec
  • Re: Filling blanks on SELECTChris White28 Dec
    • Re: [MySQL] Re: Filling blanks on SELECTAshley M. Kirchner28 Dec
      • Re: [MySQL] Re: Filling blanks on SELECTDan Nelson28 Dec
        • Re: [MySQL] Re: Filling blanks on SELECTAshley M. Kirchner28 Dec
        • SQL syntaxScott Yamahata29 Dec
          • Re: SQL syntaxViSolve DB Team29 Dec
          • Re: SQL syntaxViSolve DB Team29 Dec
          • Re: SQL syntaxJoerg Bruehe29 Dec
          • Re: SQL syntaxRhino31 Dec