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 '&& qna_product.qna_p_id=0 OR qna.qna_open='Y' && qna_product.product_id=14 && ' at line 1