Created
September 16, 2011 18:00
-
-
Save x8k2/1222704 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user_id = mysql.query('select id from users where dumper = 0 limit 1 for update').first #Sets the user_id to 5 for example | |
| mysql.query("update users set dumper = 1 where id = #{user_id}") #Updates the found user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment