Decoding Error - Syntax error, malformed JSON
/home/triappusd/public_html/index.php on line 1084

/home/triappusd/public_html/index.php on line 1085

Notice: Undefined index: id in /home/bikeportals/public_html/api_tua/index.php on line 221

Error : 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 'HAVING image_count>=3) AS tmp' at line 43
Err No. 1064
SELECT MAX(engine_size) AS cc_max ,MIN(engine_size) AS cc_min ,MIN(price) AS price_min ,MIN(price) AS price_max ,COUNT(DISTINCT id) AS total_results ,GROUP_CONCAT(vehicle_age) AS ages ,GROUP_CONCAT(mileage) AS mileages ,COUNT(DISTINCT dealer_location_id) AS dealer_locations ,GROUP_CONCAT(DISTINCT model_variant) AS variants ,GROUP_CONCAT(DISTINCT `range`) AS brandRange FROM (SELECT ,description ,IF(CHAR_LENGTH(description) > 7, CONCAT(SUBSTRING(description, 1, 40), '...'),description) AS description_short ,IF(engine_size=0,'',engine_size)AS engine_size ,is_metallic AS is_metalic ,legal_33bhp ,legal_125cc ,manufacturer_colour AS colour_display ,mileage ,price_old AS old_price ,price ,registration_plate ,registration_year ,model ,model_variant ,REPLACE(model_variant, ' ', '-') AS model_full ,price_old - price AS saving ,LOWER(REPLACE(CONCAT(registration_year,' ',registration_letter,' ',registration_year,' ',brand,model_variant,' ',engine_size), ' ', '-')) AS slug ,title ,`range` ,unique_id ,youtube_code ,dealer_location_id ,vehicle_data_id ,registration_date ,TIMESTAMPDIFF(YEAR,registration_date, NOW() ) AS vehicle_age ,lng ,lat ,0 AS distance_from_postcode ,IFNULL((SELECT COUNT(*) FROM bp_image WHERE item_type = 'vehicle' AND ),0 ) AS image_count FROM bp_vehicle LEFT JOIN bp_dealer_location_extra ON dealer_location_id = bp_dealer_location_extra.location_id LEFT JOIN bp_vehicle_data_view_triumph bpvd ON WHERE dealer_location_id IN (43,45,60,54,51,53,55,49,63,41,62,64,67,59,56,58,70,71,72,73,78,80,82,76,48,52,88,66,89,46,91,124,50,90,93,94,96,97,98,100,99,102,103,105,111) AND manufacturer_approved_listed=1 AND = HAVING image_count>=3) AS tmp