$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