我在Xcart下运行我的商店,我在web浏览器上得到以下错误:
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
是什么原因导致我可以清除这个错误?
谢谢!
看来你的MySQL服务器已经更新了。
替换所有字符串,如'SET OPTION SQL_MAX_JOIN_SIZE'
这些'SET SESSION MAX_JOIN_SIZE'
基于unix的主机命令
sed -i 's/SET OPTION /SET SESSION /' $(grep --include='*.php' -rl 'SET OPTION ' ~/www/xcart_4_6_x)
需要检查执行此查询的xcart php脚本,并将OPTION
替换为SESSION
,以处理诸如
查询sql_big_select =1
同样,对于
SQL查询失败:SET OPTION SQL_MAX_JOIN_SIZE=1073741824
最好改成db_query("SET max_join_size=1073741824");
它适用于一些xcart安装,所以如果它对你的项目有帮助,请报告,谢谢