(select u.code, u.phone1, u.phone2, u.web, u.lat, u.lng, u.name as name, p.id, p.title, p.content, p.timestamp,p.credit,0 as istop, p.itemid, p.url, p.uid, place.tag as place, img.path as img, img2.path as logo from #__postes as p join #__users as u on u.id=p.uid left join #__hashtags as place on place.id=u.mainplace left join #__profiles as prf on prf.id=u.id left outer join #__files as img on ((img.uid=p.uid) and (img.itemid=p.id) and (img.type like 'postes')) left outer join #__files as img2 on ((img2.uid=p.uid) and (img2.type like 'logo')) where ( (u.active=1 OR p.approved=1) and ((p.title like '%Seamless steel pipe%') or (u.name like '%Seamless steel pipe%') or (p.keywords like '%Seamless steel pipe%')) and (deleted <> 1) ) group by p.id ORDER BY (if(p.title like '%Seamless steel pipe%', 1, 0) + (p.title like 'Seamless') + (p.title like 'Seamless steel') + (p.title like 'Seamless steel pipe') + (p.title like 'steel') + (p.title like 'steel pipe') + (p.title like 'pipe')) desc, p.updatetime DESC limit 0, 30)

Seamless steel pipe