a),
First of all, let's say the error phenomenon:
Most of the popular Ecshop templates on the market need to execute a paragraph or a few SQL statements to modify the data structure or initialize some of it.
Most Ecshop administrators will execute these SQL statements through the Ecshop backend database management SQL query for the sake of convenience.
The problem is that when you paste into the SQL statement and click "Submit Query", the system will report the following error:
This SQL may contain update,delete,truncate,alter,drop,flush,insert,replace,set,create,concat
Attention:
The above error will only appear under the system with the latest patch ECSHOP2.7.3, if your ecshop system does not hit the latest patch, this error will not occur.
Here's the reason for the error:
The above error prompts, because ECSHOP2.7.3 the latest patch files, the ecshop background of the "SQL query" function is limited,
Only select query statements are allowed, and SQL statements such as ALTER, UPDATE, DELETE, truncate, and so on, except for select, are forbidden.
II),
Let's talk about the workaround:
Open admin/sql.php Find the following code, delete can
if(!Empty($_post[' SQL '])){Preg_match_all("/(SELECT)/i",$_post[' SQL '],$matches);if(isset($matches[1]) &&Count($matches[1]) >1) {sys_msg ("This SQL more than one select");}if(Preg_match("/(update| delete| truncate| alter| drop| flush| Insert| replace| Set| create| CONCAT)/I ",$_post[' SQL ']) {sys_msg ("This SQL may contain Update,delete,truncate,alter,drop,flush,insert,replace,set,create,concat");}}
Ecshop Background SQL query hint error This SQL may contain Update,delete,truncate,alter,drop,flush,insert