Mysql隨機修改記錄,用於隨機抽獎程序

update opus set times='2' where times is null order by rand() limit 100it 隨機更新關鍵在於 order by rand().必要的table limit 100用於隨機抽出100條記錄出來date set times='2' where times is null 用於記錄,中了第二次抽獎,並且中獎的不能再獲獎.select
相關文章
相關標籤/搜索