SELECT DISTINCT
            phone_code,
            city_en,
            city_zh,
            d.name_en, d.name_zh, d.listing_id, d.address_en, d.address_zh, d.phone, d.city_id, d.listing_id, d.ts_added, d.ts_updated, d.latitude, d.longitude, d.logo, d.status, CASE when name_en like '%O\'reilly\'s)ORPROCEDURE/**/ANALYSE(EXTRACTVALUE(8971,CONCAT(0x5c,0x6a493766,(SELECT/**/(ELT(2836=2836,1))),0x6a493766)),1)%' then 1 else 0 END as titlematch,
                SUM(CASE when cat.category_en LIKE '%O\'reilly\'s)ORPROCEDURE/**/ANALYSE(EXTRACTVALUE(8971,CONCAT(0x5c,0x6a493766,(SELECT/**/(ELT(2836=2836,1))),0x6a493766)),1)%' THEN 1 ELSE 0 END) as tagmatch , 111.045 * DEGREES(ACOS(COS(RADIANS(0.000000))
					* COS(RADIANS(latitude))
					* COS(RADIANS(longitude) - RADIANS(0.000000))
					+ SIN(RADIANS(0.000000))
					* SIN(RADIANS(latitude))))
					AS distance_in_km FROM listings_data d
            LEFT JOIN listings_i2c i2c ON (i2c.listing_id = d.listing_id)
            LEFT JOIN ads_deployments ads ON (ads.listing_id = d.listing_id)
            LEFT JOIN listings_cities c ON (c.city_id = d.city_id)  LEFT JOIN listings_categories cat ON (i2c.category_id = cat.category_id)  WHERE d.status = 1  AND d.city_id = 1  AND c.live = 1 GROUP BY d.listing_id  HAVING titlematch >= 1 OR tagmatch >= 1ORDER BY distance_in_km ASC,  ORDER BY titlematch DESC, tagmatch DESC, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BY distance_in_km ASC,  ORDER BY titlematch DESC, tagmatch DESC' at line 14
SELECT DISTINCT
            phone_code,
            city_en,
            city_zh,
            d.name_en, d.name_zh, d.listing_id, d.address_en, d.address_zh, d.phone, d.city_id, d.listing_id, d.ts_added, d.ts_updated, d.latitude, d.longitude, d.logo, d.status, CASE when name_en like '%O\'reilly\'s)ORPROCEDURE/**/ANALYSE(EXTRACTVALUE(8971,CONCAT(0x5c,0x6a493766,(SELECT/**/(ELT(2836=2836,1))),0x6a493766)),1)%' then 1 else 0 END as titlematch,
                SUM(CASE when cat.category_en LIKE '%O\'reilly\'s)ORPROCEDURE/**/ANALYSE(EXTRACTVALUE(8971,CONCAT(0x5c,0x6a493766,(SELECT/**/(ELT(2836=2836,1))),0x6a493766)),1)%' THEN 1 ELSE 0 END) as tagmatch , 111.045 * DEGREES(ACOS(COS(RADIANS(0.000000))
					* COS(RADIANS(latitude))
					* COS(RADIANS(longitude) - RADIANS(0.000000))
					+ SIN(RADIANS(0.000000))
					* SIN(RADIANS(latitude))))
					AS distance_in_km FROM listings_data d
            LEFT JOIN listings_i2c i2c ON (i2c.listing_id = d.listing_id)
            LEFT JOIN ads_deployments ads ON (ads.listing_id = d.listing_id)
            LEFT JOIN listings_cities c ON (c.city_id = d.city_id)  LEFT JOIN listings_categories cat ON (i2c.category_id = cat.category_id)  WHERE d.status = 1  AND d.city_id = 1  AND c.live = 1 GROUP BY d.listing_id  HAVING titlematch >= 1 OR tagmatch >= 1ORDER BY distance_in_km ASC,  ORDER BY titlematch DESC, tagmatch DESC LIMIT 0, 20, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BY distance_in_km ASC,  ORDER BY titlematch DESC, tagmatch DESC LIMIT 0, 20' at line 14
“O'reilly's)ORPROCEDURE/**/ANALYSE(EXTRACTVALUE(8971,CONCAT(0x5c,0x6a493766,(SELECT/**/(ELT(2836=2836,1))),0x6a493766)),1)” Listings in Kunming - GoKunming
i2 International Institute of Education