Jump to content

Archived

This topic is now archived and is closed to further replies.

Bee

Update table

Recommended Posts

Hi,

I am getting mad here! I don't know why this stuff just don't work.

I am trying to update this table. When I set the condition to UserID which is the primary key, it does not change it and it returns this message even if I supply an existing UserID:
Query OK, 0 rows affected
Rows matched: 0 Changed: 0 Warnings: 0


If The condition was something else like Surname, Email...etc, it works fine.

The primay key (UserID) is auto_increment!

[code]mysql> UPDATE PersonalDetails SET Initials="Miss", Surname="Something", Forename="Maja", Address="01 Co", PostCode="212", TelHome="21", TelMobile="121", Email="person@hotmail.com" WHERE UserID=14; [/code]

Thanks very much in advance.

Bee

Share this post


Link to post
Share on other sites
[!--quoteo(post=350920:date=Mar 2 2006, 06:39 AM:name=Bee)--][div class=\'quotetop\']QUOTE(Bee @ Mar 2 2006, 06:39 AM) [snapback]350920[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hi,

I am getting mad here! I don't know why this stuff just don't work.

I am trying to update this table. When I set the condition to UserID which is the primary key, it does not change it and it returns this message even if I supply an existing UserID:
Query OK, 0 rows affected
Rows matched: 0 Changed: 0 Warnings: 0
If The condition was something else like Surname, Email...etc, it works fine.

The primay key (UserID) is auto_increment!

[code]mysql> UPDATE PersonalDetails SET Initials="Miss", Surname="Something", Forename="Maja", Address="01 Co", PostCode="212", TelHome="21", TelMobile="121", Email="person@hotmail.com" WHERE UserID=14; [/code]

Thanks very much in advance.

Bee
[/quote]

And this UserID with "14" exists =) ?

Share this post


Link to post
Share on other sites
[!--quoteo(post=350923:date=Mar 2 2006, 07:04 AM:name=nezbie)--][div class=\'quotetop\']QUOTE(nezbie @ Mar 2 2006, 07:04 AM) [snapback]350923[/snapback][/div][div class=\'quotemain\'][!--quotec--]
And this UserID with "14" exists =) ?
[/quote]


Yes, it does!

Share this post


Link to post
Share on other sites
UPDATE won't, well, "update" if that information is already present in the table.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.