[ 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.000537s ]
[ 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.000176s ]
[ SQL ] SHOW COLUMNS FROM `wt_site_question` [ RunTime:0.000457s ]
[ 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` = '15' GROUP BY `a`.`id` HAVING count(d.id)>0 ) `_group_count_` LIMIT 1 [ RunTime:0.000192s ]
[ 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` = '15' GROUP BY `a`.`id` HAVING count(d.id)>0 ORDER BY `a`.`id` DESC,`n` DESC LIMIT 33,3 [ RunTime:0.020265s ]
[ 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` = '15' GROUP BY `a`.`id` HAVING count(d.id)=0 ) `_group_count_` LIMIT 1 [ RunTime:0.000231s ]
[ 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` = '15' GROUP BY `a`.`id` HAVING count(d.id)=0 ORDER BY `a`.`id` DESC,`n` DESC LIMIT 33,3 [ RunTime:0.022479s ]
[ 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` = '15' GROUP BY `a`.`id` ) `_group_count_` LIMIT 1 [ RunTime:0.000236s ]
[ 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` = '15' GROUP BY `a`.`id` ORDER BY `a`.`id` DESC,`n` DESC LIMIT 33,3 [ RunTime:0.019940s ]
[ SQL ] SHOW COLUMNS FROM `wt_site_art` [ RunTime:0.000695s ]
[ SQL ] SELECT `a`.`id`,`a`.`art_name` FROM `wt_site_art` `a` LEFT JOIN `wt_site_art_class` `ac` ON `a`.`class_id`=`ac`.`id` LEFT JOIN `wt_site_art_class` `acb` ON `ac`.`pclass_id`=`acb`.`id` WHERE `a`.`site_id` = '1047' AND `acb`.`id` = '607' ORDER BY `a`.`id` DESC LIMIT 0,5 [ RunTime:0.000343s ]
[ 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.000165s ]