I am running my store under Xcart and I get following error on top of web browser:
INVALID SQL: 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 'OPTION SQL_MAX_JOIN_SIZE=1073741824' at line 1
SQL QUERY FAILURE:SET OPTION SQL_MAX_JOIN_SIZE=1073741824
INVALID SQL: 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 'OPTION SQL_BIG_SELECTS=1' at line 1
SQL QUERY FAILURE:SET OPTION SQL_BIG_SELECTS=1
INVALID SQL: 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 'OPTION SQL_BIG_SELECTS=1' at line 1
SQL QUERY FAILURE:SET OPTION SQL_BIG_SELECTS=1
what cause this so I can clear the error?
thanks!
It seems your MySQL server has been updated.
Replace all strings like
'SET OPTION SQL_MAX_JOIN_SIZE'
to these
'SET SESSION MAX_JOIN_SIZE'
A command for the unix-based hostings
sed -i 's/SET OPTION /SET SESSION /' $(grep --include='*.php' -rl 'SET OPTION ' ~/www/xcart_4_6_x)
It needs to check the xcart php scripts where this query is executed and OPTION to be replaced with SESSION for the errors like
SQL QUERY FAILURE:SET OPTION SQL_BIG_SELECTS=1
Also, as for
SQL QUERY FAILURE:SET OPTION SQL_MAX_JOIN_SIZE=1073741824
it might worth to change it just to db_query("SET max_join_size=1073741824");
It works for some xcart installations so please report if it helps to your project as well, thanks
Related
I am trying to execute this query in MySQL:
INSERT INTO eier_borettslag(bsID, eierID)
VALUES(1, 1);
MySQL prompts me with this error message:
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
Could someone help me identify the syntax error and explain why the query gets executed even though the syntax is wrong?
I am trying to get my database example_dog_names into a sql file. The command I have tried to do this is:
example_dog_names > C:/Users/man/Desktop/dbfile.sql;
The error that I am getting says:
ERROR 1064 (42000): 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
'example_dog_names < C:/Users/man/Desktop/dbfile.sql' at line 1
What am I missing? I am connected to MySQL, and I executed the command:
USE example_dog_names;
Any help is appreciated!
I am using Server version: 5.6.26 MySQL Community Server (GPL).I am trying to insert into subodh table using & operator using following query
insert into subodh values(&date_of_birth,&name,&age,&qualification,&id);
but it is showing the following error
ERROR 1064 (42000): 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 '&date
_of_birth,&name,&age,&qualification,&id)' at line 1
please help me.
Thanks
So when I run this script
mysql -h $mysqlhost -u$mysqluser -p$mysqlpass --database=$mysqldatabase -se "INSERT into $mysqldatabase.$mysqltable (prodID,mergePerformed,mergeStartdate) values ($prodID,'Merge - ${FIX_VERSION} ${BRANCH_TO_MERGE} to ${PROJECT_NAME} trunk', now())";
I get this error
ERROR 1064 (42000) at line 1: 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 ''Merge - ${FIX_VERSION} ${BRANCH_TO_MERGE} to ${PROJECT_NAME} trunk', now())' at line 1
Anyone have any thoughts as to why this is...it works when there aren't any variables in jenkins.
Can`t see anything wrong as it stands, as xQbert says it is most likely to be some of your variable substitution.
MySQL syntax errors usually quote the text just after the error, so I would take a look at what is going into $prodID as it is the most likely culprit.
I have a wordpress site, but when I import the database in my cpanel I found SQL error:
SQL query: Edit
SHOW TABLE STATUS FROM skynines_advicementor
MySQL said: Documentation
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 '
Error
SQL query at line 1
I can't find solution of this error.