[ DB ] CONNECT:[ UseTime:0.000319s ] mysql:host=127.0.0.1;dbname=app;charset=utf8
[ SQL ] SHOW COLUMNS FROM `wt_site_question_class` [ RunTime:0.000535s ]
[ SQL ] SELECT `id`,`class_name` FROM `wt_site_question_class` WHERE `site_id` = 1047 AND `pclass_id` = 0 AND `status` = 1 ORDER BY `sort` DESC [ RunTime:0.000145s ]
[ SQL ] SHOW COLUMNS FROM `wt_site_question` [ RunTime:0.000451s ]
[ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM wt_site_question as a LEFT JOIN `wt_site_member` `b` ON `a`.`uid`=`b`.`id` LEFT JOIN `wt_site_question_class` `c` ON `a`.`class_id`=`c`.`id` LEFT JOIN `wt_site_answer` `d` ON `a`.`id`=d.question_id and d.status>0 WHERE `a`.`site_id` = '1047' AND `a`.`status` = '1' AND `c`.`id` = '20' GROUP BY `a`.`id` HAVING count(d.id)>0 ) `_group_count_` LIMIT 1 [ RunTime:0.008894s ]
[ SQL ] SELECT a.id,a.question,a.create_time,count(d.id) as n,b.name,c.class_name,b.wxAvatar FROM wt_site_question as a LEFT JOIN `wt_site_member` `b` ON `a`.`uid`=`b`.`id` LEFT JOIN `wt_site_question_class` `c` ON `a`.`class_id`=`c`.`id` LEFT JOIN `wt_site_answer` `d` ON `a`.`id`=d.question_id and d.status>0 WHERE `a`.`site_id` = '1047' AND `a`.`status` = '1' AND `c`.`id` = '20' GROUP BY `a`.`id` HAVING count(d.id)>0 ORDER BY `a`.`id` DESC,`n` DESC LIMIT 3,3 [ RunTime:0.008771s ]
[ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM wt_site_question as a LEFT JOIN `wt_site_member` `b` ON `a`.`uid`=`b`.`id` LEFT JOIN `wt_site_question_class` `c` ON `a`.`class_id`=`c`.`id` LEFT JOIN `wt_site_answer` `d` ON `a`.`id`=d.question_id and d.status>0 WHERE `a`.`site_id` = '1047' AND `a`.`status` = '1' AND `c`.`id` = '20' GROUP BY `a`.`id` HAVING count(d.id)=0 ) `_group_count_` LIMIT 1 [ RunTime:0.008736s ]
[ SQL ] SELECT a.id,a.question,a.create_time,count(d.id) as n,b.name,c.class_name,b.wxAvatar FROM wt_site_question as a LEFT JOIN `wt_site_member` `b` ON `a`.`uid`=`b`.`id` LEFT JOIN `wt_site_question_class` `c` ON `a`.`class_id`=`c`.`id` LEFT JOIN `wt_site_answer` `d` ON `a`.`id`=d.question_id and d.status>0 WHERE `a`.`site_id` = '1047' AND `a`.`status` = '1' AND `c`.`id` = '20' GROUP BY `a`.`id` HAVING count(d.id)=0 ORDER BY `a`.`id` DESC,`n` DESC LIMIT 3,3 [ RunTime:0.008848s ]
[ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM wt_site_question as a LEFT JOIN `wt_site_member` `b` ON `a`.`uid`=`b`.`id` LEFT JOIN `wt_site_question_class` `c` ON `a`.`class_id`=`c`.`id` LEFT JOIN `wt_site_answer` `d` ON `a`.`id`=d.question_id and d.status>0 WHERE `a`.`site_id` = '1047' AND `a`.`status` = '1' AND `c`.`id` = '20' GROUP BY `a`.`id` ) `_group_count_` LIMIT 1 [ RunTime:0.008638s ]
[ SQL ] SELECT a.id,a.question,a.create_time,count(d.id) as n,b.name,c.class_name,b.wxAvatar FROM wt_site_question as a LEFT JOIN `wt_site_member` `b` ON `a`.`uid`=`b`.`id` LEFT JOIN `wt_site_question_class` `c` ON `a`.`class_id`=`c`.`id` LEFT JOIN `wt_site_answer` `d` ON `a`.`id`=d.question_id and d.status>0 WHERE `a`.`site_id` = '1047' AND `a`.`status` = '1' AND `c`.`id` = '20' GROUP BY `a`.`id` ORDER BY `a`.`id` DESC,`n` DESC LIMIT 3,3 [ RunTime:0.008517s ]
[ SQL ] SHOW COLUMNS FROM `wt_site_art` [ RunTime:0.000621s ]
[ SQL ] SELECT `id`,`art_name` FROM `wt_site_art` WHERE `site_id` = 1047 AND `status` >= 1 ORDER BY `id` DESC LIMIT 5 [ RunTime:0.000238s ]
[ SQL ] SELECT a.id,a.question,a.create_time ,count(b.id) as n,b.id as bid FROM wt_site_question as a LEFT JOIN `wt_site_answer` `b` ON `a`.`id`=b.question_id and b.status >=1 WHERE `a`.`site_id` = '1047' AND `a`.`status` = '1' GROUP BY `a`.`id` HAVING count(b.id)>0 ORDER BY `n` DESC,`a`.`id` DESC LIMIT 5 [ RunTime:0.053897s ]