I have gathered top 10 users for specific task. Using the query given below.
$sqlsum=mysql_query("SELECT `userid`, SUM(`points`) as `total` FROM
`tablename` GROUP BY `userid` ORDER BY total DESC LIMIT 10");
Now , I need to award bonues to the top 10 gathered users only. I am not getting the idea , on how to write query for this purpose.
I need to update one field in tablename = user , field name = bonus .
Kindly guide.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…