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 'AND a.bike_id != '' ORDER BY a.Type, bike_name, cash_price ) ' at line 35
1064
SELECT * FROM (SELECT bike_model_id, bike_id, type, slug, order_by, MIN(cash_price) AS cash_price, bike_name, image_id, colour_name, interest_rate_apr, monthly_repayment, deposit FROM (SELECT Bike_Model_id as bike_model_id, a.bike_id, a.Order_By as order_by, a.Type as type, a.Bike_Slug as slug, b.cash_price, TRIM(REPLACE(a.Bike_Name, a.Year, '')) as bike_name, b.colour as image_id, c.name as colour_name, b.interest_rate_apr, b.monthly_repayment, b.deposit FROM New_Bike_Spec a INNER JOIN Triumph_PCP_Representative_copy b ON b.bike_id = a.bike_id INNER JOIN new_bike_image c ON c.id = b.colour WHERE Manufacturer = 'triumph' AND a.Status = 'on' AND b.exclude = 0 AND a.Type = 'adventure' AND cash_price > AND a.bike_id != '' ORDER BY a.Type, bike_name, cash_price ) AS tmp GROUP BY bike_id ORDER BY cash_price ASC LIMIT 2) AS tmp ORDER BY monthly_repayment
FILECLASSFUNCTIONLINE
select_finance_new.phpdatabasegetRecordsObject126
init.inc.phpinclude_once50
page_style_switch.phpinclude49
content_area.phpinclude105
index.phpinclude756
triumphinclude10