List:General Discussion« Previous MessageNext Message »
From:misiaQ Date:December 11 2009 10:09am
Subject:RE: Update Doesn't Update!
View as plain text  
If ID column is primary key and auto increment as you said, it cant be equal
to zero.
You got a query which reads:
UPDATE columns WHERE false

There is no chance for any updates.
http://dev.mysql.com/doc/refman/5.0/en/update.html

Regards,
m

-----Original Message-----
From: Victor Subervi [mailto:victorsubervi@stripped] 
Sent: 11 December 2009 10:06
Cc: mysql@stripped
Subject: Re: Update Doesn't Update!

On Fri, Dec 11, 2009 at 4:48 AM, Jørn Dahl-Stamnes
<sql06@stripped>wrote:

> On Friday 11 December 2009 10:38, Victor Subervi wrote:
> > Hi;
> >
> > mysql> update products set sizes="('Small', 'Large')" where ID=0;
> > 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=0 if ID is an index.
>

Yikes! Then how do I update this table? I will need to update every variable
*except* the ID, which is the primary key and an auto_increment.
V


----------------------------------------------------------------------
Szef przynudza? Zagraj sobie!
Sprawdz >>> http://link.interia.pl/f24e4

Thread
Update Doesn't Update!Victor Subervi11 Dec
  • Re: Update Doesn't Update!carsten11 Dec
    • Re: Update Doesn't Update!Victor Subervi11 Dec
      • Re: Update Doesn't Update!carsten11 Dec
        • Re: Update Doesn't Update!Victor Subervi11 Dec
          • Re: Update Doesn't Update!carsten11 Dec
            • Re: Update Doesn't Update!Victor Subervi11 Dec
  • Re: Update Doesn't Update!Jørn Dahl-Stamnes11 Dec
    • Re: Update Doesn't Update!Victor Subervi11 Dec
    • Re: Update Doesn't Update!Victor Subervi11 Dec
      • RE: Update Doesn't Update!misiaQ11 Dec
    • Re: Update Doesn't Update!carsten11 Dec
      • Re: Update Doesn't Update!Chris Knipe11 Dec
    • Re: Update Doesn't Update!Mark Goodge11 Dec
      • Re: Update Doesn't Update!Johan De Meersman11 Dec
        • Re: Update Doesn't Update!Victor Subervi11 Dec
          • Re: Update Doesn't Update!Johan De Meersman11 Dec
  • Re: Update Doesn't Update!Martijn Tonies11 Dec
  • Re: Update Doesn't Update!Yang Wang11 Dec