1064 - 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 '' at line 1

select distinct p.products_image, p.products_artist, pd.products_name, m.manufacturers_name, p.products_date_added, f.format_name, p.products_id, m.manufacturers_id, p.products_id, p.format_id, p.producttype_id, f.format_id, f.format_name, p.products_artist, pd.products_description, p.products_status, pd.products_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price , pt.track_one_url from products p left join manufacturers m using(manufacturers_id) left join format f on p.format_id=f.format_id left join specials s on p.products_id = s.products_id left join products_tracklisting pt on p.products_id = pt.products_id, products_description pd, categories c, products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%the%' or p.products_catno like '%the%' or p.products_artist like '%the%' or m.manufacturers_name like '%the%' or pt.track_one_title like '%the%' or pt.track_two_title like '%the%' or pt.track_three_title like '%the%' or pt.track_four_title like '%the%' or pt.track_five_title like '%the%' or pt.track_six_title like '%the%' or pt.track_seven_title like '%the%' or pt.track_eight_title like '%the%' or pt.track_nine_title like '%the%' or pt.track_ten_title like '%the%' or pt.track_eleven_title like '%the%' or pt.track_twelve_title like '%the%' or pt.track_thirteen_title like '%the%' or pt.track_fourteen_title like '%the%' or pt.track_fifteen_title like '%the%' or pt.track_sixteen_title like '%the%' or pt.track_seventeen_title like '%the%' or pt.track_eighteen_title like '%the%' or pt.track_nineteen_title like '%the%' or pt.track_twenty_title like '%the%' or pt.track_one_artist like '%the%' or pt.track_two_artist like '%the%' or pt.track_three_artist like '%the%' or pt.track_four_artist like '%the%' or pt.track_five_artist like '%the%' or pt.track_six_artist like '%the%' or pt.track_seven_artist like '%the%' or pt.track_eight_artist like '%the%' or pt.track_nine_artist like '%the%' or pt.track_ten_artist like '%the%' or pt.track_eleven_artist like '%the%' or pt.track_twelve_artist like '%the%' or pt.track_thirteen_artist like '%the%' or pt.track_fourteen_artist like '%the%' or pt.track_fifteen_artist like '%the%' or pt.track_sixteen_artist like '%the%' or pt.track_seventeen_artist like '%the%' or pt.track_eighteen_artist like '%the%' or pt.track_nineteen_artist like '%the%' or pt.track_twenty_artist like '%the%') and (pd.products_name like '%vitamin%' or p.products_catno like '%vitamin%' or p.products_artist like '%vitamin%' or m.manufacturers_name like '%vitamin%' or pt.track_one_title like '%vitamin%' or pt.track_two_title like '%vitamin%' or pt.track_three_title like '%vitamin%' or pt.track_four_title like '%vitamin%' or pt.track_five_title like '%vitamin%' or pt.track_six_title like '%vitamin%' or pt.track_seven_title like '%vitamin%' or pt.track_eight_title like '%vitamin%' or pt.track_nine_title like '%vitamin%' or pt.track_ten_title like '%vitamin%' or pt.track_eleven_title like '%vitamin%' or pt.track_twelve_title like '%vitamin%' or pt.track_thirteen_title like '%vitamin%' or pt.track_fourteen_title like '%vitamin%' or pt.track_fifteen_title like '%vitamin%' or pt.track_sixteen_title like '%vitamin%' or pt.track_seventeen_title like '%vitamin%' or pt.track_eighteen_title like '%vitamin%' or pt.track_nineteen_title like '%vitamin%' or pt.track_twenty_title like '%vitamin%' or pt.track_one_artist like '%vitamin%' or pt.track_two_artist like '%vitamin%' or pt.track_three_artist like '%vitamin%' or pt.track_four_artist like '%vitamin%' or pt.track_five_artist like '%vitamin%' or pt.track_six_artist like '%vitamin%' or pt.track_seven_artist like '%vitamin%' or pt.track_eight_artist like '%vitamin%' or pt.track_nine_artist like '%vitamin%' or pt.track_ten_artist like '%vitamin%' or pt.track_eleven_artist like '%vitamin%' or pt.track_twelve_artist like '%vitamin%' or pt.track_thirteen_artist like '%vitamin%' or pt.track_fourteen_artist like '%vitamin%' or pt.track_fifteen_artist like '%vitamin%' or pt.track_sixteen_artist like '%vitamin%' or pt.track_seventeen_artist like '%vitamin%' or pt.track_eighteen_artist like '%vitamin%' or pt.track_nineteen_artist like '%vitamin%' or pt.track_twenty_artist like '%vitamin%') and (pd.products_name like '%string%' or p.products_catno like '%string%' or p.products_artist like '%string%' or m.manufacturers_name like '%string%' or pt.track_one_title like '%string%' or pt.track_two_title like '%string%' or pt.track_three_title like '%string%' or pt.track_four_title like '%string%' or pt.track_five_title like '%string%' or pt.track_six_title like '%string%' or pt.track_seven_title like '%string%' or pt.track_eight_title like '%string%' or pt.track_nine_title like '%string%' or pt.track_ten_title like '%string%' or pt.track_eleven_title like '%string%' or pt.track_twelve_title like '%string%' or pt.track_thirteen_title like '%string%' or pt.track_fourteen_title like '%string%' or pt.track_fifteen_title like '%string%' or pt.track_sixteen_title like '%string%' or pt.track_seventeen_title like '%string%' or pt.track_eighteen_title like '%string%' or pt.track_nineteen_title like '%string%' or pt.track_twenty_title like '%string%' or pt.track_one_artist like '%string%' or pt.track_two_artist like '%string%' or pt.track_three_artist like '%string%' or pt.track_four_artist like '%string%' or pt.track_five_artist like '%string%' or pt.track_six_artist like '%string%' or pt.track_seven_artist like '%string%' or pt.track_eight_artist like '%string%' or pt.track_nine_artist like '%string%' or pt.track_ten_artist like '%string%' or pt.track_eleven_artist like '%string%' or pt.track_twelve_artist like '%string%' or pt.track_thirteen_artist like '%string%' or pt.track_fourteen_artist like '%string%' or pt.track_fifteen_artist like '%string%' or pt.track_sixteen_artist like '%string%' or pt.track_seventeen_artist like '%string%' or pt.track_eighteen_artist like '%string%' or pt.track_nineteen_artist like '%string%' or pt.track_twenty_artist like '%string%') and (pd.products_name like '%quartet%' or p.products_catno like '%quartet%' or p.products_artist like '%quartet%' or m.manufacturers_name like '%quartet%' or pt.track_one_title like '%quartet%' or pt.track_two_title like '%quartet%' or pt.track_three_title like '%quartet%' or pt.track_four_title like '%quartet%' or pt.track_five_title like '%quartet%' or pt.track_six_title like '%quartet%' or pt.track_seven_title like '%quartet%' or pt.track_eight_title like '%quartet%' or pt.track_nine_title like '%quartet%' or pt.track_ten_title like '%quartet%' or pt.track_eleven_title like '%quartet%' or pt.track_twelve_title like '%quartet%' or pt.track_thirteen_title like '%quartet%' or pt.track_fourteen_title like '%quartet%' or pt.track_fifteen_title like '%quartet%' or pt.track_sixteen_title like '%quartet%' or pt.track_seventeen_title like '%quartet%' or pt.track_eighteen_title like '%quartet%' or pt.track_nineteen_title like '%quartet%' or pt.track_twenty_title like '%quartet%' or pt.track_one_artist like '%quartet%' or pt.track_two_artist like '%quartet%' or pt.track_three_artist like '%quartet%' or pt.track_four_artist like '%quartet%' or pt.track_five_artist like '%quartet%' or pt.track_six_artist like '%quartet%' or pt.track_seven_artist like '%quartet%' or pt.track_eight_artist like '%quartet%' or pt.track_nine_artist like '%quartet%' or pt.track_ten_artist like '%quartet%' or pt.track_eleven_artist like '%quartet%' or pt.track_twelve_artist like '%quartet%' or pt.track_thirteen_artist like '%quartet%' or pt.track_fourteen_artist like '%quartet%' or pt.track_fifteen_artist like '%quartet%' or pt.track_sixteen_artist like '%quartet%' or pt.track_seventeen_artist like '%quartet%' or pt.track_eighteen_artist like '%quartet%' or pt.track_nineteen_artist like '%quartet%' or pt.track_twenty_artist like '%quartet%') ) order by