View Single Post
Old 09-03-2011, 09:43 AM  
camperjohn64
Confirmed User
 
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
I got this far:

SELECT @rownum:=@rownum+1 'bd_rank', u.bd_id, u.bd_likes FROM bd_user u, (SELECT @rownum:=0) r ORDER BY bd_likes DESC



Now I just need to figure out how to:

UPDATE videos SET videos.bd_rank=results.(SELECT same above) WHERE videos.bd_id=results.bd_id

...or something like that. I'm not good with compound statements.
__________________
www.gimmiegirlproductions.com
camperjohn64 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote