Notice: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-8,8' at line 1
Error No: 1064
SELECT c.customer_id AS customer_id, (SELECT 3959 * acos( cos( radians('0') ) * cos( radians( a.lat ) ) * cos( radians(a.lng ) - radians('0') ) + sin( radians('0')) * sin(radians(a.lat)))) AS miles, a.lat AS lat, a.lng AS lng, a.company AS company, CONCAT(UPPER(left(c.firstname,1)),substring(c.firstname,2,(length(c.firstname)-1)),' ',UPPER(left(c.lastname,1)),substring(c.lastname,2,(length(c.lastname)-1)))AS name, c.active AS active, c.start AS start, ci.about_me AS about_me, ci.qualifications AS qualifications, ci.specialities AS specialities, (SELECT COUNT(*) AS total FROM customer_review cr WHERE cr.customer_id = c.customer_id) AS total FROM customer c LEFT JOIN address a ON(a.customer_id = c.customer_id) LEFT JOIN customer_info ci ON(ci.customer_id = c.customer_id) LEFT JOIN city ct ON(ct.city_id=a.city) LEFT JOIN zone z ON(z.zone_id=ct.zone_id) WHERE c.customer_id > 0 AND (active_end_time > NOW() OR export_status=1) AND (CONCAT(ct.name, ',', z.name) LIKE '%Lymm%' OR CONCAT(ct.name, ',', z.name) LIKE '%Lymm%') AND (Lower(ci.specialities) LIKE '%warrington%') AND (SELECT 3959 * acos( cos( radians('0') ) * cos( radians( a.lat ) ) * cos( radians(a.lng ) - radians('0') ) + sin( radians('0')) * sin(radians(a.lat)))) < 0 GROUP BY c.customer_id ORDER BY miles ASC LIMIT -8,8 in /home/personal/public_html/system/database/mysql.php on line 50