thinkphp 随机获取一条数据

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

ps:find()无效
原文地址:https://www.cnblogs.com/leilei-1/p/8654175.html