[ DB ] CONNECT:[ UseTime:0.000322s ] mysql:host=127.0.0.1;dbname=app;charset=utf8
[ SQL ] SHOW COLUMNS FROM `wt_site_question_class` [ RunTime:0.000541s ]
[ 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.000161s ]
[ SQL ] SHOW COLUMNS FROM `wt_site_question` [ RunTime:0.000428s ]
[ 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.008674s ]
[ 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 6,3 [ RunTime:0.008575s ]
[ 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.008451s ]
[ 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 6,3 [ RunTime:0.008442s ]
[ 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.008224s ]
[ 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 6,3 [ RunTime:0.008353s ]
[ SQL ] SHOW COLUMNS FROM `wt_site_art` [ RunTime:0.000583s ]
[ SQL ] SELECT `id`,`art_name` FROM `wt_site_art` WHERE `site_id` = 1047 AND `status` >= 1 ORDER BY `id` DESC LIMIT 5 [ RunTime:0.000246s ]
[ 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.051249s ]