SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND wp_posts.ID NOT IN (883) AND (
wp_term_relationships.term_taxonomy_id IN (40,91,48,49,51,52,53,86)
) AND wp_posts.post_type = 'listing' AND ((wp_posts.post_status = 'publish')) AND wp_posts.ID in (select pm.post_id from wp_postmeta pm where pm.meta_key ='post_city_id' and FIND_IN_SET( 4, pm.meta_value )) AND (wp_posts.ID in (341,394,1020,910,1103,1126,1207,302,1186,1204,832,899,486,367,328,804,908,128,469,312,132,343,380,1093,1304,702,817,371,314,1124,643,1074,1477,664,1405,1463,404,334,1081,796,927,1116,1257,1518,1211,1291,1553,865,1489,1175,1263,1538,879,408,1026,1267,124,126,133,842,1270,1572,1265,338,680,676,669,1096,1182,1166,323,1023,1040,306,330,1296,691,1076,662,685,280,1154,1248,693,383,683,278,1221,806,808,355,276,1046,1259,422,316,1537,885,917,1010,1035,134,913,666,473,1042,1299,1377,1508,439,1541,964,656,1122,1169,1373,1674,873,700,1425,1018,294,1131,1357,1457,1469,1099,1558,881,274,1065,332,648,1233,1315,800,946,412,292,296,1388,944,396,392,290,467,1060,1071,1285,1630,1641,942,523,550,353,437,475,282,1480,948,520,562,489,1078,1083,1261,1624,125,127,129,130,131,696,349,386,374,689,288,1050,1053,1055,1241,1333,1349,1652,1676,869,952,548,480,641,1086,1231,1324,1338,823,838,893,919,956,962,532,556,425,465,1062,1473,897,954,534,377,1148,1355,1399,1413,1437,1601,794,798,813,819,830,854,856,860,862,938,940,494,304,1216,528,526,1224,1643,931,400,300,1531,1570,687,1487,792,358,345,389,1014,1016,1038,1534,1272,136,704,515,553,415,497,501,891,902,936,506,360,1146,1152,1238,1219,844,887,915,347,454,1483,828,651,906,559,402,336,1134,1347,810,852,1634,815,921,923,478,871,537,483,836,875,877,492,1228,1255,1486,840,933,431,471,1529,825,858,889,950,362,410,398,459,1008,1150,1163,1394,512,463,1002,1048,1143,1236,1524,929,659,1090,1253,1370,1458,653,672,319,1648,925,958,434,645,1000,1200,904,539,1032,135,802,1562,1669,960,419,428,1172,1193,1226,1525,1568,518,1029,1119,1246,503,308,325,895,821,1555,541,546,321,544,351,298,1108,286,406,461,530,1564,1251,1068,310,456,1044,1579,1616,1141)) GROUP BY wp_posts.ID ORDER BY RAND() LIMIT 0, 3