$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);