select SQL_CALC_FOUND_ROWS tradeleads.tradeleadid, tradeleads.type, tradeleads.subject, tradeleads.bid, tradeleads.postdate, tradeleads.languageid, classifications.english, classifications.classificationid, classifications.maincatid, locations.location, locations.countryid, companies.company, companies.compid, companies.siteid, companies.totalpayments, companies.url, tradeleads.verifyid, tradeleads.verifytime, tradeleads.lastmodified, tradeleads.tradelead, DATE_FORMAT(tradeleads.postdate, '%e %M, %Y') as formattedpostdate, DATE_FORMAT(tradeleads.lastmodified, '%e %M, %Y') as formattedlastmodifieddate from tradeleads, classifications, locations, companies where tradeleads.compid = companies.compid and tradeleads.classificationid = classifications.classificationid and companies.locationid = locations.locationid and tradeleads.tradeleadid in (400600,563605,462775,111964) order by tradeleads.bid desc, tradeleads.tlrating desc, tradeleads.postdateunixtimestamp desc, tradeleads.tradeleadid desc limit 0, 20