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