ORDER BY FIELD(`p`.`product_id`, 574, 572, 573)
SELECT `t2`.`name`
FROM `mp_tree` AS `t1`
JOIN `mp_tree` AS `t2`
ON `t1`.`path` LIKE CONCAT(`t2`.`path`, '.%')
WHERE `t1`.`id` = :id
ORDER BY `t2`.`path` DESC
SELECT `name`
FROM `mp_tree`
WHERE :path LIKE CONCAT(`path`, '.%')
ORDER BY `path` DESC
SELECT *
FROM (
SELECT *, MATCH `text` AGAINST('database') AS `score`
FROM `articles`
) AS `t`
WHERE `score` > 0
ORDER BY `source` != 'auto', `score`
SELECT *
FROM (
SELECT *, MATCH `text` AGAINST('database') AS `score`
FROM `articles`
) AS `t`
WHERE `score` > 0
ORDER BY `score`+(`source` = 'auto')*0.5 DESC