$list = M()->query('
select a.id,a.uid,a.type,a.num,a.people_num,a.theme,a.teacher,a.date,a.end_date,a.ctime,a.status,a.student1 as student1_id,
(select t.theme from `course_theme` as t where t.id= a.theme) as theme,
(select u.name from `user` as u where u.id= a.student1) as student1,
(select u.tel from `user` as u where u.id= a.student1) as tel1,
(select u.img from `user` as u where u.id= a.student1) as sfz_url_1,
(select s.status from `baoming_status` as s where s.user_id= a.student1 and s.theme_id= a.theme) as student1_status
from `course_submission` as a order by date desc limit '.$Page->firstRow.','.$Page->listRows);
//echo $message->getLastSql();
//dump($list);1242:Subquery returns more than 1 row [ SQL语句 ] : select a.id,a.uid,a.type,a.num,a.people_num,a.theme,a.teacher,a.date,a.end_date,a.ctime,a.status,a.student1 as student1_id, (select t.theme from `course_theme` as t where t.id= a.theme) as theme, (select u.name from `user` as u where u.id= a.student1) as student1, (select u.tel from `user` as u where u.id= a.student1) as tel1, (select u.img from `user` as u where u.id= a.student1) as sfz_url_1, (select s.status from `baoming_status` as s where s.user_id= a.student1 and s.theme_id= a.theme) as student1_status from `course_submission` as a order by date desc limit 0,10错误位置
FILE: D:\phpStudy\WWW\baoming\ThinkPHP\Library\Think\Db\Driver.class.php LINE: 350
最佳答案