sql 语句,乱序查询ORDER BY RAND()

  • ORDER BY RAND()
        $sql = 'select id,name,type,songurl,imgurl from tf_chall_title where `chall_id` = ' . $id . ' and `status` = 1 and `is_del` = 0 ORDER BY RAND() limit 0,' . $flag['title_num'];

        $title_flag = $chall_title->query($sql);
原文地址:https://www.cnblogs.com/pansidong/p/13684219.html