SELECT
storefronts.*
FROM
cscart_storefronts AS storefronts
WHERE
1 = 1
AND (
storefronts.url = 'bacpvdev2.tabo.vn'
OR storefronts.url = 'www.bacpvdev2.tabo.vn'
OR storefronts.url LIKE 'www_.bacpvdev2.tabo.vn'
OR storefronts.url LIKE 'bacpvdev2.tabo.vn/%'
OR storefronts.url LIKE 'www.bacpvdev2.tabo.vn/%'
OR storefronts.url LIKE 'www_.bacpvdev2.tabo.vn/%'
)
GROUP BY
storefronts.storefront_id
ORDER BY
storefronts.url = 'bacpvdev2.tabo.vn' DESC,
storefronts.url = 'www.bacpvdev2.tabo.vn' DESC,
storefronts.url LIKE 'www_.bacpvdev2.tabo.vn' DESC,
storefronts.url LIKE 'bacpvdev2.tabo.vn/%' DESC,
storefronts.url LIKE 'www.bacpvdev2.tabo.vn/%' DESC,
storefronts.url LIKE 'www_.bacpvdev2.tabo.vn/%' desc