List:General Discussion« Previous MessageNext Message »
From:Joerg Bruehe Date:December 29 2006 10:17am
Subject:Re: SQL syntax
View as plain text  
Hi Scott, all,


Scott Yamahata wrote:
> 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.

The error in your statement is that it does not provide a value for the 
"countryid" field.
I suspect this whole statement was generated by your application, but 
the input data did not contain a value for this field.
In such a case, your statement must not contain the "countryid =" part, 
and the field will receive its default value.
Alternatively, you can explicitly set that field to NULL (provided your 
"create table" allows NULL for it).


Then, there is an error in your mail:
You intended to start a new thread, but your mail contains an 
"in-reply-to" header which makes it part of another thread.
Probably you used some "reply" function where "write" (new) was appropriate.
I assume you did not intentionally "hijack" that other thread, but it 
does make reading more difficult than necessary.


Jörg

-- 
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com
Office:  (+49 30) 417 01 487     VoIP: 4464@stripped

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