List:General Discussion« Previous MessageNext Message »
From:Blake Schroeder Date:June 9 2004 7:11pm
Subject:Re: inserting works fine but I cant update.
View as plain text  
Dan

Great suggestion also.

-Blake

Dan Nelson wrote:

>In the last episode (Jun 09), Blake Schroeder said:
>  
>
>>Query
>>UPDATE table SET 1 = '1' WHERE id = '1'
>>
>>|#1064 - 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 '1  =  '1' WHERE id =  '1'' at line 1
>>    
>>
>
>Mysql is seeing the 1 as a literal number 1.  You can force it to be a
>column/table name by putting backtics around it: `1`.  You will
>probably be happier if you change the column names to something that
>doesn't require special treatment, though, like "col1" .. "col28".
>
>  
>

Thread
inserting works fine but I cant update.Blake Schroeder9 Jun
  • Re: inserting works fine but I cant update.Dan Nelson9 Jun
    • Re: inserting works fine but I cant update.Blake Schroeder9 Jun
      • Re: inserting works fine but I cant update.Dan Nelson9 Jun
        • Re: inserting works fine but I cant update.Blake Schroeder9 Jun
  • Re: inserting works fine but I cant update.Ronan Lucio9 Jun
  • Re: inserting works fine but I cant update.Ronan Lucio9 Jun
    • Re: inserting works fine but I cant update.Blake Schroeder9 Jun