SELECT `Post`.`id`, `Post`.`title`, `Post`.`name_vie`, `Post`.`name_eng`, `Post`.`slug`, `Post`.`description`, `Post`.`keyword`, `Post`.`content_eng`, `Post`.`content_vie`, `Post`.`active`, `Post`.`feature`, `Post`.`left_sidebar`, `Post`.`help`, `Post`.`footer`, `Post`.`canonical`, `Post`.`views`, `Post`.`order`, `Post`.`image`, `Post`.`comment`, `Post`.`blog_category_id`, `Post`.`blog_category_id_2`, `Post`.`blog_category_id_3`, `Post`.`blog_category_id_4`, `Post`.`user_id`, `Post`.`created`, `BlogCategory`.`id`, `BlogCategory`.`title`, `BlogCategory`.`name_vie`, `BlogCategory`.`name_eng`, `BlogCategory`.`slug`, `BlogCategory`.`description`, `BlogCategory`.`keyword`, `BlogCategory`.`introduction`, `BlogCategory`.`active`, `BlogCategory`.`order`, `BlogCategory`.`type`, `BlogCategory`.`parent_id`, `BlogCategory`.`rght`, `BlogCategory`.`lft`, `BlogCategory`.`image`, `BlogCategory`.`created`, `User`.`id`, `User`.`username`, `User`.`email`, `User`.`password`, `User`.`name`, `User`.`google`, `User`.`image`, `User`.`slogan`, `User`.`role`, `User`.`token`, `User`.`active`, `User`.`created`, (SELECT COUNT(*) FROM posts WHERE `posts`.`user_id` = `User`.`id`) AS `User__countPost`, (SELECT COUNT(*) FROM posts WHERE `posts`.`user_id` = `User`.`id` AND `posts`.`active`=1) AS `User__countPostActive`, (SELECT COUNT(*) FROM posts WHERE `posts`.`user_id` = `User`.`id` AND `posts`.`active`=0) AS `User__countPostInActive`, (SELECT COUNT(*) FROM posts WHERE `posts`.`user_id` = `User`.`id` AND `posts`.`created` >= "2021-01-01 00:00:00") AS `User__countPostInMonth`, (SELECT COUNT(*) FROM posts WHERE `posts`.`user_id` = `User`.`id` AND `posts`.`active`=1 AND `posts`.`created` >= "2021-01-01 00:00:00") AS `User__countPostInMonthActive`, (SELECT COUNT(*) FROM posts WHERE `posts`.`user_id` = `User`.`id` AND `posts`.`created` >= "2020-12-01 00:00:00" AND `posts`.`created` < "2021-01-01 00:00:00") AS `User__countPostInLastMonth`, (SELECT COUNT(*) FROM posts WHERE `posts`.`user_id` = `User`.`id` AND `posts`.`active`=1 AND `posts`.`created` >= "2020-12-01 00:00:00" AND `posts`.`created` < "2021-01-01 00:00:00") AS `User__countPostInLastMonthActive`, (SELECT COUNT(*) FROM comments WHERE `comments`.`old_comment`=0 OR `comments`.`old_comment` IS NULL) AS `User__count_comment`, (SELECT COUNT(*) FROM posts WHERE `posts`.`user_id` = `User`.`id` AND `posts`.`active`=0 AND ( `posts`.`comment` IS NOT NULL AND `posts`.`comment` !='')) AS `User__count_posts_invalid`, (SELECT COUNT(*) FROM posts WHERE `posts`.`active`=0 AND ( `posts`.`comment` IS NOT NULL AND `posts`.`comment` !='')) AS `User__count_posts_invalid_all`, (SELECT COUNT(*) FROM posts WHERE `posts`.`active`=0 AND ( `posts`.`comment` IS NULL OR `posts`.`comment` ="")) AS `User__count_posts_inactive`, (SELECT COUNT(*) FROM posts WHERE `posts`.`user_id` = `User`.`id` AND `posts`.`active`=0 AND ( `posts`.`comment` IS NULL OR `posts`.`comment` ="")) AS `User__count_posts_inactive_user`, (SELECT COUNT(*) FROM posts WHERE `posts`.`active`=0) AS `User__count_posts_inactive_all` FROM `chophutung_db`.`posts` AS `Post` LEFT JOIN `chophutung_db`.`blog_categories` AS `BlogCategory` ON (`Post`.`blog_category_id` = `BlogCategory`.`id`) LEFT JOIN `chophutung_db`.`users` AS `User` ON (`Post`.`user_id` = `User`.`id`) WHERE `Post`.`slug` = 'phat-hien-bat-thuong-cua-dieu-hoa-o-to-bang-dong-ho-do-ap-suat' LIMIT 1 | 1 | 1 | 11 | maybe slow |
SELECT `Tag`.`id`, `Tag`.`tag`, `Tag`.`slug`, `Tag`.`description`, `Tag`.`keyword`, `Tag`.`title`, `Tag`.`view`, `Tag`.`order`, `Tag`.`home_page`, `Tag`.`created`, `PostsTag`.`id`, `PostsTag`.`tag_id`, `PostsTag`.`post_id`, `PostsTag`.`created` FROM `chophutung_db`.`tags` AS `Tag` JOIN `chophutung_db`.`posts_tags` AS `PostsTag` ON (`PostsTag`.`post_id` = 383 AND `PostsTag`.`tag_id` = `Tag`.`id`) | 1 | 1 | 0 | |