[ DB ] CONNECT:[ UseTime:0.000332s ] mysql:host=127.0.0.1;dbname=app;charset=utf8
[ SQL ] SHOW COLUMNS FROM `wt_site_question_class` [ RunTime:0.000578s ]
[ 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.000151s ]
[ SQL ] SHOW COLUMNS FROM `wt_site_question` [ RunTime:0.000476s ]
[ 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` = '17' GROUP BY `a`.`id` HAVING count(d.id)>0 ) `_group_count_` LIMIT 1 [ RunTime:0.009147s ]
[ 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` = '17' GROUP BY `a`.`id` HAVING count(d.id)>0 ORDER BY `a`.`id` DESC,`n` DESC LIMIT 6,3 [ RunTime:0.009236s ]
[ 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` = '17' GROUP BY `a`.`id` HAVING count(d.id)=0 ) `_group_count_` LIMIT 1 [ RunTime:0.008672s ]
[ 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` = '17' GROUP BY `a`.`id` HAVING count(d.id)=0 ORDER BY `a`.`id` DESC,`n` DESC LIMIT 6,3 [ RunTime:0.008721s ]
[ 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` = '17' GROUP BY `a`.`id` ) `_group_count_` LIMIT 1 [ RunTime:0.008618s ]
[ 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` = '17' GROUP BY `a`.`id` ORDER BY `a`.`id` DESC,`n` DESC LIMIT 6,3 [ RunTime:0.008580s ]
[ SQL ] SHOW COLUMNS FROM `wt_site_art` [ RunTime:0.000617s ]
[ 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` = '608' ORDER BY `a`.`id` DESC LIMIT 0,5 [ RunTime:0.017123s ]
[ 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.053335s ]