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 'and ptf.products_extra_fields_value <>'' and (pef.languages_id='0' or pef.langua' at line 5

SELECT pef.products_extra_fields_order, pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM products_extra_fields pef LEFT JOIN products_to_products_extra_fields ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id= and ptf.products_extra_fields_value <>'' and (pef.languages_id='0' or pef.languages_id='6') ORDER BY pef.products_extra_fields_order