Bee Posted March 2, 2006 Share Posted March 2, 2006 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 affectedRows matched: 0 Changed: 0 Warnings: 0If 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="[email protected]" WHERE UserID=14; [/code]Thanks very much in advance.Bee Link to comment https://forums.phpfreaks.com/topic/3904-update-table/ Share on other sites More sharing options...
nezbie Posted March 2, 2006 Share Posted March 2, 2006 [!--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 affectedRows matched: 0 Changed: 0 Warnings: 0If 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="[email protected]" WHERE UserID=14; [/code]Thanks very much in advance.Bee[/quote]And this UserID with "14" exists =) ? Link to comment https://forums.phpfreaks.com/topic/3904-update-table/#findComment-13512 Share on other sites More sharing options...
Bee Posted March 2, 2006 Author Share Posted March 2, 2006 [!--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! Link to comment https://forums.phpfreaks.com/topic/3904-update-table/#findComment-13513 Share on other sites More sharing options...
fenway Posted March 2, 2006 Share Posted March 2, 2006 UPDATE won't, well, "update" if that information is already present in the table. Link to comment https://forums.phpfreaks.com/topic/3904-update-table/#findComment-13567 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.