0

i am getting below error while adding product in magento 2.1.5

SELECT `e`.* FROM `catalog_category_entity` AS `e` WHERE (())

2 exception(s): Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42000]: Syntax error or access violation: 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, query was: SELECT e.* FROM catalog_category_entity AS e WHERE (()) Exception #1 (PDOException): SQLSTATE[42000]: Syntax error or access violation: 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

Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42000]: Syntax error or access violation: 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, query was: SELECT e.* FROM catalog_category_entity AS e WHERE (())

1
  • I would recommend trying to reindex as this usually fixes the majority of database related issues Commented Jan 10, 2020 at 8:58

1 Answer 1

0

Just remove an empty WHERE (()) because it is wrong syntax for MySQL. In case you don't know from where it comes, add more details: when and where that error appears.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.