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.* FROMcatalog_category_entityASeWHERE (()) 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 1Exception #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.* FROMcatalog_category_entityASeWHERE (())
-
I would recommend trying to reindex as this usually fixes the majority of database related issuesDava Gordon– Dava Gordon2020年01月10日 08:58:02 +00:00Commented Jan 10, 2020 at 8:58
1 Answer 1
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.