update opus set times='2' where times is null order by rand() limit 100
随机更新关键在于 order by rand().必要的
limit 100用于随机抽出100条记录出来
set times='2' where times is null 用于记录,中了第二次抽奖,而且中奖的不能再获奖.
无聊写了这么多,牛人一看就骂了呵呵.
另外select * from table order by rand()也是可行的。