Update Doesn"t Update!
am 11.12.2009 10:38:01 von Victor Subervi
--0016362575da008bc2047a70ae61
Content-Type: text/plain; charset=ISO-8859-1
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
mysql> select sizes, colorsShadesNumbersShort from products where ID=0;
+-------+--------------------------+
| sizes | colorsShadesNumbersShort |
+-------+--------------------------+
| | |
+-------+--------------------------+
1 row in set (0.00 sec)
Huh?
TIA,
Victor
--0016362575da008bc2047a70ae61--
Re: Update Doesn"t Update!
am 11.12.2009 10:43:31 von Carsten
On Fri, 11 Dec 2009 04:38:01 -0500, 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
"Warnings: 1"
do a SHOW WARNINGS immediately after you execute the stmt.
/ Carsten
>
> mysql> select sizes, colorsShadesNumbersShort from products where ID=0;
> +-------+--------------------------+
> | sizes | colorsShadesNumbersShort |
> +-------+--------------------------+
> | | |
> +-------+--------------------------+
> 1 row in set (0.00 sec)
>
> Huh?
> TIA,
> Victor
>
>
> !DSPAM:451,4b221339930275276717544!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: Update Doesn"t Update!
am 11.12.2009 10:48:59 von sql06
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.
=2D-=20
J=F8rn Dahl-Stamnes
homepage: http://www.dahl-stamnes.net/dahls/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
Re: Update Doesn"t Update!
am 11.12.2009 11:04:56 von Victor Subervi
--00163649a6f34429ba047a710e95
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Fri, Dec 11, 2009 at 4:48 AM, 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.
>
Yikes! Then how do I update this table? I will need to update every variabl=
e
*except* the ID, which is the primary key and an auto_increment.
V
--00163649a6f34429ba047a710e95--
Re: Update Doesn"t Update!
am 11.12.2009 11:05:46 von Victor Subervi
--0023544706744057eb047a711132
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Fri, Dec 11, 2009 at 4:48 AM, 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.
>
Yikes! Then how do I update this table? I will need to update every variabl=
e
*except* the ID, which is the primary key and an auto_increment.
V
--0023544706744057eb047a711132--
Re: Update Doesn"t Update!
am 11.12.2009 11:08:55 von Martijn Tonies
>> 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.
Are you serious??
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
RE: Update Doesn"t Update!
am 11.12.2009 11:09:33 von misiaQ
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@gmail.com]=20
Sent: 11 December 2009 10:06
Cc: mysql@lists.mysql.com
Subject: Re: Update Doesn't Update!
On Fri, Dec 11, 2009 at 4:48 AM, 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.
>
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
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
Re: Update Doesn"t Update!
am 11.12.2009 11:09:52 von Victor Subervi
--0016364ee71eefe777047a711f29
Content-Type: text/plain; charset=ISO-8859-1
On Fri, Dec 11, 2009 at 4:43 AM, wrote:
>
> On Fri, 11 Dec 2009 04:38:01 -0500, 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
>
> "Warnings: 1"
>
> do a SHOW WARNINGS immediately after you execute the stmt.
>
mysql> update products set sizes="('Small', 'Large')" where SKU='prodSKU1';
Query OK, 0 rows affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 1
mysql> show warnings;
+---------+------+------------------------------------------ --+
| Level | Code | Message |
+---------+------+------------------------------------------ --+
| Warning | 1265 | Data truncated for column 'sizes' at row 1 |
+---------+------+------------------------------------------ --+
1 row in set (0.00 sec)
What do? How do I enter multiple values?
TIA,
V
--0016364ee71eefe777047a711f29--
Re: Update Doesn"t Update!
am 11.12.2009 11:12:12 von Carsten
On Fri, 11 Dec 2009 10:48:59 +0100, 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.
Then how did he manage to get a matched row?
Of course you can have ID=0.
/ Carsten
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: Update Doesn"t Update!
am 11.12.2009 11:13:52 von Carsten
On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi
wrote:
> mysql> update products set sizes="('Small', 'Large')" where
SKU='prodSKU1';
> Query OK, 0 rows affected, 1 warning (0.00 sec)
> Rows matched: 1 Changed: 0 Warnings: 1
>
> mysql> show warnings;
> +---------+------+------------------------------------------ --+
> | Level | Code | Message |
> +---------+------+------------------------------------------ --+
> | Warning | 1265 | Data truncated for column 'sizes' at row 1 |
> +---------+------+------------------------------------------ --+
> 1 row in set (0.00 sec)
>
>
> What do? How do I enter multiple values?
Impossible to say, until you let us know how you defined the column in the
first place...
/ Carsten
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: Update Doesn"t Update!
am 11.12.2009 11:19:08 von Mark Goodge
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.
Mark
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: Update Doesn"t Update!
am 11.12.2009 11:21:07 von Yang Wang
Zmlyc3QgZGVzYyBwcm9kdWN0cw0KDQpvciB0cnkgdG8NCg0KdXBkYXRlIHBy b2R1Y3RzIHNldCBz
aXplcz0nU21hbGwnIHdoZXJlDQpTS1U9J3Byb2RTS1UxJzsNCg0KDQoNCg0K QmVzdCBSZWdhcmRz
IQ0KWWFuZyBXYW5nDQogDQpUZWwuOiAwNzY5LTIxNjg3Mzk3DQpGYXguOiAw NzY5LTIxNjg1NTc3
DQpFbWFpbDogeXdhbmdAbGZtLWFnaWxlLmNvbS5oaw0KLS0tLS0gT3JpZ2lu YWwgTWVzc2FnZSAt
LS0tLSANCkZyb206IDxjYXJzdGVuQGJpdGJ5Yml0LmRrPg0KVG86ICJWaWN0 b3IgU3ViZXJ2aSIg
PHZpY3RvcnN1YmVydmlAZ21haWwuY29tPg0KQ2M6IDxteXNxbEBsaXN0cy5t eXNxbC5jb20+DQpT
ZW50OiBGcmlkYXksIERlY2VtYmVyIDExLCAyMDA5IDY6MTMgUE0NClN1Ympl Y3Q6IFJlOiBVcGRh
dGUgRG9lc24ndCBVcGRhdGUhDQoNCg0KPiANCj4gT24gRnJpLCAxMSBEZWMg MjAwOSAwNTowOTo1
MiAtMDUwMCwgVmljdG9yIFN1YmVydmkNCj4gPHZpY3RvcnN1YmVydmlAZ21h aWwuY29tPg0KPiB3
cm90ZToNCj4gDQo+PiBteXNxbD4gdXBkYXRlIHByb2R1Y3RzIHNldCBzaXpl cz0iKCdTbWFsbCcs
ICdMYXJnZScpIiB3aGVyZQ0KPiBTS1U9J3Byb2RTS1UxJzsNCj4+IFF1ZXJ5 IE9LLCAwIHJvd3Mg
YWZmZWN0ZWQsIDEgd2FybmluZyAoMC4wMCBzZWMpDQo+PiBSb3dzIG1hdGNo ZWQ6IDEgIENoYW5n
ZWQ6IDAgIFdhcm5pbmdzOiAxDQo+PiANCj4+IG15c3FsPiBzaG93IHdhcm5p bmdzOw0KPj4gKy0t
LS0tLS0tLSstLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0t
LS0rDQo+PiB8IExldmVsICAgfCBDb2RlIHwgTWVzc2FnZSAgICAgICAgICAg ICAgICAgICAgICAg
ICAgICAgICAgICAgIHwNCj4+ICstLS0tLS0tLS0rLS0tLS0tKy0tLS0tLS0t LS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKw0KPj4gfCBXYXJuaW5nIHwgMTI2 NSB8IERhdGEgdHJ1
bmNhdGVkIGZvciBjb2x1bW4gJ3NpemVzJyBhdCByb3cgMSB8DQo+PiArLS0t LS0tLS0tKy0tLS0t
LSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LSsNCj4+IDEgcm93
IGluIHNldCAoMC4wMCBzZWMpDQo+PiANCj4+IA0KPj4gV2hhdCBkbz8gSG93 IGRvIEkgZW50ZXIg
bXVsdGlwbGUgdmFsdWVzPw0KPiANCj4gSW1wb3NzaWJsZSB0byBzYXksIHVu dGlsIHlvdSBsZXQg
dXMga25vdyBob3cgeW91IGRlZmluZWQgdGhlIGNvbHVtbiBpbiB0aGUNCj4g Zmlyc3QgcGxhY2Uu
Li4NCj4gDQo+IC8gQ2Fyc3Rlbg0KPiANCj4gDQo+IC0tIA0KPiBNeVNRTCBH ZW5lcmFsIE1haWxp
bmcgTGlzdA0KPiBGb3IgbGlzdCBhcmNoaXZlczogaHR0cDovL2xpc3RzLm15 c3FsLmNvbS9teXNx
bA0KPiBUbyB1bnN1YnNjcmliZTogICAgaHR0cDovL2xpc3RzLm15c3FsLmNv bS9teXNxbD91bnN1
Yj15d2FuZ0BsZm0tYWdpbGUuY29tLmhrDQo+
Re: Update Doesn"t Update!
am 11.12.2009 11:26:37 von Chris Knipe
Quoting carsten@bitbybit.dk:
> Of course you can have ID=0.
Definately agree
mysql> DESCRIBE test;
+---------+-------------+------+-----+---------+------------ ----+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+------------ ----+
| autoinc | int(11) | NO | PRI | NULL | auto_increment |
| value | varchar(10) | NO | | NULL | |
+---------+-------------+------+-----+---------+------------ ----+
2 rows in set (0.00 sec)
mysql> SELECT * FROM test;
+---------+------------+
| autoinc | value |
+---------+------------+
| 0 | 1234567890 |
+---------+------------+
1 row in set (0.00 sec)
mysql> UPDATE test SET value='a' WHERE autoinc='0';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> SELECT * FROM test;
+---------+-------+
| autoinc | value |
+---------+-------+
| 0 | a |
+---------+-------+
1 row in set (0.00 sec)
However, what I believe the problem is:
mysql> UPDATE test set value='12345678901' WHERE autoinc='0';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 1
mysql> SELECT * FROM test;
+---------+------------+
| autoinc | value |
+---------+------------+
| 0 | 1234567890 |
+---------+------------+
1 row in set (0.00 sec)
the value of value is too long for the varchar(10) in the table. It
thus generates the warning, and truncate the field.
The poster's table needs to be updated therefor to accept longer
variables in the sizes column.
--
Regards,
Chris.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: Update Doesn"t Update!
am 11.12.2009 11:28:41 von Victor Subervi
--000e0cd5cca63cd404047a7163fc
Content-Type: text/plain; charset=ISO-8859-1
On Fri, Dec 11, 2009 at 5:13 AM, wrote:
>
> On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi
>
> wrote:
>
> > mysql> update products set sizes="('Small', 'Large')" where
> SKU='prodSKU1';
> > Query OK, 0 rows affected, 1 warning (0.00 sec)
> > Rows matched: 1 Changed: 0 Warnings: 1
> >
> > mysql> show warnings;
> > +---------+------+------------------------------------------ --+
> > | Level | Code | Message |
> > +---------+------+------------------------------------------ --+
> > | Warning | 1265 | Data truncated for column 'sizes' at row 1 |
> > +---------+------+------------------------------------------ --+
> > 1 row in set (0.00 sec)
> >
> >
> > What do? How do I enter multiple values?
>
> Impossible to say, until you let us know how you defined the column in the
> first place...
>
Sorry. It's an enum of which the elements I am trying to add into a row are
elements of the same enum; that is, a subset.
V
--000e0cd5cca63cd404047a7163fc--
Re: Update Doesn"t Update!
am 11.12.2009 11:33:08 von Carsten
On Fri, 11 Dec 2009 05:28:41 -0500, Victor Subervi
wrote:
> On Fri, Dec 11, 2009 at 5:13 AM, wrote:
>
>>
>> On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi
>>
>> wrote:
>>
>> > mysql> update products set sizes="('Small', 'Large')" where
>> SKU='prodSKU1';
>> > Query OK, 0 rows affected, 1 warning (0.00 sec)
>> > Rows matched: 1 Changed: 0 Warnings: 1
>> >
>> > mysql> show warnings;
>> > +---------+------+------------------------------------------ --+
>> > | Level | Code | Message |
>> > +---------+------+------------------------------------------ --+
>> > | Warning | 1265 | Data truncated for column 'sizes' at row 1 |
>> > +---------+------+------------------------------------------ --+
>> > 1 row in set (0.00 sec)
>> >
>> >
>> > What do? How do I enter multiple values?
>>
>> Impossible to say, until you let us know how you defined the column in
>> the
>> first place...
>>
>
> Sorry. It's an enum of which the elements I am trying to add into a row
are
> elements of the same enum; that is, a subset.
You're using the wrong type. RTFM re. the difference between enums and
sets.
/ Carsten
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: Update Doesn"t Update!
am 11.12.2009 11:47:39 von Victor Subervi
--0016364ee71e16a905047a71a717
Content-Type: text/plain; charset=ISO-8859-1
On Fri, Dec 11, 2009 at 5:33 AM, wrote:
>
> On Fri, 11 Dec 2009 05:28:41 -0500, Victor Subervi
>
> wrote:
> > On Fri, Dec 11, 2009 at 5:13 AM, wrote:
> >
> >>
> >> On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi
> >>
> >> wrote:
> >>
> >> > mysql> update products set sizes="('Small', 'Large')" where
> >> SKU='prodSKU1';
> >> > Query OK, 0 rows affected, 1 warning (0.00 sec)
> >> > Rows matched: 1 Changed: 0 Warnings: 1
> >> >
> >> > mysql> show warnings;
> >> > +---------+------+------------------------------------------ --+
> >> > | Level | Code | Message |
> >> > +---------+------+------------------------------------------ --+
> >> > | Warning | 1265 | Data truncated for column 'sizes' at row 1 |
> >> > +---------+------+------------------------------------------ --+
> >> > 1 row in set (0.00 sec)
> >> >
> >> >
> >> > What do? How do I enter multiple values?
> >>
> >> Impossible to say, until you let us know how you defined the column in
> >> the
> >> first place...
> >>
> >
> > Sorry. It's an enum of which the elements I am trying to add into a row
> are
> > elements of the same enum; that is, a subset.
>
> You're using the wrong type. RTFM re. the difference between enums and
> sets.
>
k. Thanks,
V
--0016364ee71e16a905047a71a717--
Re: Update Doesn"t Update!
am 11.12.2009 13:43:52 von Johan De Meersman
--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@tuxera.b=
e
>
>
--0003255735d2ad9044047a73466f--
Re: Update Doesn"t Update!
am 11.12.2009 18:40:17 von Victor Subervi
--001636417d5fc163e3047a776a83
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Fri, Dec 11, 2009 at 8:43 AM, Johan De Meersman wrot=
e:
> 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=
..
>
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
--001636417d5fc163e3047a776a83--
Re: Update Doesn"t Update!
am 11.12.2009 21:58:43 von Johan De Meersman
--001636c5971b6b564b047a7a3093
Content-Type: text/plain; charset=ISO-8859-1
On Fri, Dec 11, 2009 at 6:40 PM, Victor Subervi wrote:
>
> 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?
>
Yes, that should not have happened. For autoincrement fields, both NULL and
0 are "magic" values to get the next number from the sequence at insert
time.
--001636c5971b6b564b047a7a3093--