cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax error or access violation: 1064 issue

Syntax error or access violation: 1064 issue

Updating modules:
Schema creation/updates:
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 '=core_config_data WHERE `Non_unique` = 1' at line 1

When we run php bin/magento setup:upgrade this command at the time above error display in the terminal.


Please share if you have any solution to the same.

2 REPLIES 2

Re: Syntax error or access violation: 1064 issue

Hi @Ashish_k_php 

It looks like there is some issue with your custom module.


Search below keyword in your custom module

Non_unique


There are not any column exist (non_unique) in core_config_data table in Magento. Correct the query in your module. 

 

I hope it will help you!

Re: Syntax error or access violation: 1064 issue

@Vimal Kumar  thank you for quick support.

We checked in all the custom module but not get this type of word.

$condition = sprintf('`Non_unique` = 1');
$sql = sprintf('SHOW INDEXES FROM %s WHERE %s', $tableName, $condition);

 

We get this into this path only

 

/vendor/magento/framework/Setup/Declaration/Schema/Db/MySQL/DbSchemaReader.php:188:


Current Magento ver. 2.3.2 on our website.

Please once check this and guide me what can i do to resolve.