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 iSubType=2 AND p.iUserType='1' AND iCityID IN (3726,4017,3873,3942,4026,3702,3909,4037,4018,4122,4111,3689,4009,3704,3892,3868,3945,3958,3955,3884,4121,3941,3685,16520,4027,3731,3831,3998,4021,4055,3715,4054,3847,3879,3722,3727,5040,4029,5063,4084,3712) ORDER BY FIELD(iCityID, 3726,4017,3873,3942,4026,3702,3909,4037,4018,4122,4111,3689,4009,3704,3892,3868,3945,3958,3955,3884,4121,3941,3685,16520,4027,3731,3831,3998,4021,4055,3715,4054,3847,3879,3722,3727,5040,4029,5063,4084,3712) ASC, p.tmPosted DESC LIMIT 24