Advertisement
Guest User

Untitled

a guest
May 27th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.44 KB | None | 0 0
  1. SELECT `Show`.`id`, `Show`.`title`, `Show`.`slug`, `Show`.`start_year`, `Show`.`season_count`, IF Show.title == 'Lost' THEN '1' ELSE '0' END IF AS is_exact, `Country`.`name`, `Country`.`id` FROM `shows` AS `Show` LEFT JOIN `countries` AS `Country` ON (`Show`.`country_id` = `Country`.`id`)  WHERE `Show`.`active` = 1 AND `Show`.`title` LIKE '%Lost%'   ORDER BY `show_subscription_count` DESC, INSTR(`Show`.`title`, 'Lost') ASC, `start_year` DESC  LIMIT 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement