SELECT p.iPostID, p.iPostType, p.iAdType, p.iUserType, p.strTitle, p.iSubType, p.iItemType, p.iPrice, p.iPriceUnit, json_unquote(p.jsonLocation->"$.city") AS city, p.jsonExtra, p.tmPosted, p.iShowImg, p.strImages, p.strVideos, p.strPostURL FROM posts p WHERE p.iActive=1 AND p.iPostType=2 AND iPostID IN (SELECT t.iPostID FROM posttext t WHERE t.iDomID=1 AND MATCH (t.strSearch) AGAINST ('+the +car +invention' IN BOOLEAN MODE)) AND iCityID IN (3704,3702,4009,3955,3892,4037,3884,4026,3873,4017,3726,4021,3945,3689,3942,4111,3909,4018,4121,3868,4122,16520,3941,3958,4027,3731,4054,3685,3879,3722,3727,3998,5040,3831,3712,5063,3715,4108,4061,4055,5041,3733,3847,3776,4084,3700,5055) ORDER BY FIELD(iCityID, 3704,3702,4009,3955,3892,4037,3884,4026,3873,4017,3726,4021,3945,3689,3942,4111,3909,4018,4121,3868,4122,16520,3941,3958,4027,3731,4054,3685,3879,3722,3727,3998,5040,3831,3712,5063,3715,4108,4061,4055,5041,3733,3847,3776,4084,3700,5055) ASC, p.tmPosted DESC LIMIT 24