thinkphp 随机获取一条数据

 db('xxx')->where(['status'=>'0'])->limit(1)->order('rand()')->select();

 


ps:find()无效
posted @ 2018-03-26 21:41  lei12138  阅读(7262)  评论(0)    收藏  举报