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 12
in:
[select p.products_model, pd.products_name, pme.products_id, p.products_type, p.master_categories_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping from products p, products_description pd, product_book_extra pme left join specials s on pme.products_id = s.products_id, book_genre a, book_genre_description ad, books_to_genres bta where a.book_genre_id = '4' and a.book_genre_id = ad.book_genre_id and ad.language_id = '1' and ad.language_id = bta.language_idg and p.products_id = pme.products_id and p.products_status = 1 and pd.products_id = pme.products_id and pd.language_id = '1' and bta.book_genre_id = a.book_genre_id and bta.products_id = p.products_id order by ]