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="person@hotmail.com" WHERE UserID=14; [/code]Thanks very much in advance.Bee Quote 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="person@hotmail.com" WHERE UserID=14; [/code]Thanks very much in advance.Bee[/quote]And this UserID with "14" exists =) ? Quote 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! Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/3904-update-table/#findComment-13567 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.