From: Johan De Meersman Date: December 11 2009 12:43pm Subject: Re: Update Doesn't Update! List-Archive: http://lists.mysql.com/mysql/219658 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=0003255735d2ad9044047a73466f --0003255735d2ad9044047a73466f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, Dec 11, 2009 at 11:19 AM, Mark Goodge wrote= : > J=F8rn Dahl-Stamnes wrote: > >> On Friday 11 December 2009 10:38, Victor Subervi wrote: >> >>> Hi; >>> >>> mysql> update products set sizes=3D"('Small', 'Large')" where ID=3D0; >>> Query OK, 0 rows affected, 1 warning (0.00 sec) >>> Rows matched: 1 Changed: 0 Warnings: 1 >>> >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> Look at the message, 0 rows changed and 1 warning. >> You cannot have ID=3D0 if ID is an index. >> > > You can, but not if it's an auto-increment field. > Also, not *entirely* correct, although you have to jump through a few hoops= : it can occur if the field was changed to auto_increment *after* the 0 was put in there. Yes, I inherited a database like that once, and yes, it fucks up your day. -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dvegivamp@stripped= e > > --0003255735d2ad9044047a73466f--