List:General Discussion« Previous MessageNext Message »
From:Victor Subervi Date:December 11 2009 5:40pm
Subject:Re: Update Doesn't Update!
View as plain text  
On Fri, Dec 11, 2009 at 8:43 AM, Johan De Meersman <vegivamp@stripped>wrote:

> On Fri, Dec 11, 2009 at 11:19 AM, Mark Goodge <mark@stripped>
> wrote:
>
> > Jørn Dahl-Stamnes 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.
> >>
> >
> > 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.
>

I'm lost. I set up this database originally with auto_increment and the
first value was 0. I thought that was always the case. Is there a problem
here?
V

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