From: Dan Nelson Date: June 9 2004 7:03pm Subject: Re: inserting works fine but I cant update. List-Archive: http://lists.mysql.com/mysql/167005 Message-Id: <20040609190318.GG46338@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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". -- Dan Nelson dnelson@stripped