[ DB ] CONNECT:[ UseTime:0.000312s ] mysql:host=127.0.0.1;dbname=app;charset=utf8
[ SQL ] SHOW COLUMNS FROM `wt_site_config` [ RunTime:0.000571s ]
[ SQL ] SELECT site_title as title,`keywords`,`description`,`site_logo` FROM `wt_site_config` WHERE `id` = 1047 LIMIT 1 [ RunTime:0.000151s ]
[ SQL ] SHOW COLUMNS FROM `wt_site_question_class` [ RunTime:0.000428s ]
[ 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.000134s ]
[ SQL ] SHOW COLUMNS FROM `wt_site_question` [ RunTime:0.000399s ]
[ 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` = '16' GROUP BY `a`.`id` HAVING count(d.id)>0 ) `_group_count_` LIMIT 1 [ RunTime:0.009150s ]
[ 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` = '16' GROUP BY `a`.`id` HAVING count(d.id)>0 ORDER BY `a`.`id` DESC,`n` DESC LIMIT 12,3 [ RunTime:0.008774s ]
[ 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` = '16' GROUP BY `a`.`id` HAVING count(d.id)=0 ) `_group_count_` LIMIT 1 [ RunTime:0.008808s ]
[ 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` = '16' GROUP BY `a`.`id` HAVING count(d.id)=0 ORDER BY `a`.`id` DESC,`n` DESC LIMIT 12,3 [ RunTime:0.008814s ]
[ 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` = '16' GROUP BY `a`.`id` ) `_group_count_` LIMIT 1 [ RunTime:0.008616s ]
[ 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` = '16' GROUP BY `a`.`id` ORDER BY `a`.`id` DESC,`n` DESC LIMIT 12,3 [ RunTime:0.008637s ]
[ SQL ] SHOW COLUMNS FROM `wt_site_art` [ RunTime:0.000612s ]
[ 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` = '609' ORDER BY `a`.`id` DESC LIMIT 0,5 [ RunTime:0.005296s ]
[ 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.053230s ]