nightkarnation Posted September 28, 2010 Share Posted September 28, 2010 Hey Guys, A very noob question...Here it goes: I want to update the field user_id on my database table, there a lot of rows that the user_id is the same... "testID", I just want to update only ONCE. mysql_query("UPDATE `users` SET status = '$StatusCheck' WHERE user_id = 'testID'"); Right now it's updating ALL the rows that have the user_id "testID". I just want to update only one. Any ideas? Thanks in advance! Cheers! Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted September 28, 2010 Share Posted September 28, 2010 The query string should end with LIMIT 1 Quote Link to comment Share on other sites More sharing options...
nightkarnation Posted September 28, 2010 Author Share Posted September 28, 2010 Awesome, thanks Pikachu! Cheers mate! Quote Link to comment 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.