Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. ID | username | p_title | approval | Ranking
  2.  
  3. username | p_title | approval
  4.  
  5. ash | aaa | yes
  6. bill | bbb | no
  7.  
  8. username | ranking
  9. ash | 1
  10. bill | 0
  11.  
  12. SELECT the_table UPDATE DISTINCT username
  13. SET ranking = ranking+1
  14. WHERE approval = 'yes'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement