Sugar
SELECT *,CONVERT(REPLACE(REPLACE(minp.meta_value,'£',''),',',''),UNSIGNED INTEGER) Price FROM wp_posts p inner join wp_postmeta minp on minp.post_id = p.Id and CONVERT(REPLACE(REPLACE(minp.meta_value,'£',''),',',''),UNSIGNED INTEGER) >= CONVERT('',UNSIGNED INTEGER) and minp.meta_key = 'cp_price'inner join wp_term_relationships tr on tr.object_id = p.Id inner join wp_postmeta minpp on minpp.post_id = p.Id and minpp.meta_key = 'cp_price_qualifier' WHERE post_status='publish' and post_type='post' and (post_title LIKE '%%' or post_content like '%%') ORDER BY CONVERT(REPLACE(REPLACE(minp.meta_value,'£',''),',',''),UNSIGNED INTEGER) desc