Zen Cart™ 不担保其它脚本的安全性. 测试后再用于您的数据库!');
define('HEADING_WARNING_INSTALLSCRIPTS', '说明: 不要在这里运行Zen Cart数据库升级脚本。
请上传新的zc_install目录,然后升级。');
define('TEXT_QUERY_RESULTS','执行结果:');
define('TEXT_ENTER_QUERY_STRING','输入要执行的语句:
以 ; 号结尾');
define('TEXT_QUERY_FILENAME','上传文件:');
define('ERROR_NOTHING_TO_DO','错误: 没有执行操作 - 没有指定执行语句或者执行文件.');
define('TEXT_CLOSE_WINDOW', '[ 关闭窗口 ]');
define('SQLPATCH_HELP_TEXT','该SQL工具用于安装系统补丁, 直接粘贴SQL代码到文本区. '.
'或者上传(.SQL) 脚本文件.
' .
'创建该工具使用的脚本文件时, 不要包括数据表前缀, 该工具会' .
'自动加入当前数据库的前缀, 该设置在商店的 ' .
'admin/includes/configure.php 文件中 (DB_PREFIX 定义).
' .
'输入和上传的命令必须用以下语句开头, 且为大写:'.
'
- DROP TABLE IF EXISTS
- CREATE TABLE
- INSERT INTO
- INSERT IGNORE INTO
- ALTER TABLE
' .
'- UPDATE (just a single table)
- UPDATE IGNORE (just a single table)
- DELETE FROM
- DROP INDEX
- CREATE INDEX
' .
'
- SELECT
' .
'高级模式
以下方法用于更复杂的代码:
To run some blocks of code together so that they are treated as one command by MySQL, you need the "#NEXT_X_ROWS_AS_ONE_COMMAND:xxx
" value set. The parser will then treat X number of commands as one.
If you are running this file thru phpMyAdmin or equivalent, the "#NEXT..." comment is ignored, and the script will process fine.
提示: SELECT.... FROM... and LEFT JOIN statements need the "FROM" or "LEFT JOIN" to be on a line by itself in order for the parse script to add the table prefix.
例子:
#NEXT_X_ROWS_AS_ONE_COMMAND:4
SET @t1=0;
SELECT (@t1:=configuration_value) as t1
FROM configuration
WHERE configuration_key = \'KEY_NAME_HERE\';
UPDATE product_type_layout SET configuration_value = @t1 WHERE configuration_key = \'KEY_NAME_TO_CHECK_HERE\';
DELETE FROM configuration WHERE configuration_key = \'KEY_NAME_HERE\';
- #NEXT_X_ROWS_AS_ONE_COMMAND:1
INSERT INTO tablename
(col1, col2, col3, col4)
SELECT col_a, col_b, col_3, col_4
FROM table2;
- #NEXT_X_ROWS_AS_ONE_COMMAND:1
INSERT INTO table1
(col1, col2, col3, col4 )
SELECT p.othercol_a, p.othercol_b, po.othercol_c, pm.othercol_d
FROM table2 p, table3 pm
LEFT JOIN othercol_f po
ON p.othercol_f = po.othercol_f
WHERE p.othercol_f = pm.othercol_f;
' );
define('REASON_TABLE_ALREADY_EXISTS','表%s已经存在,无法创建');
define('REASON_TABLE_DOESNT_EXIST','表%s不存在,无法删除.');
define('REASON_TABLE_NOT_FOUND','表%s不存在,无法执行.');
define('REASON_CONFIG_KEY_ALREADY_EXISTS','配置值 "%s" 已经存在,无法插入');
define('REASON_COLUMN_ALREADY_EXISTS','列%s已经存在,无法添加.');
define('REASON_COLUMN_DOESNT_EXIST_TO_DROP','列%s不存在,无法删除.');
define('REASON_COLUMN_DOESNT_EXIST_TO_CHANGE','列%s不存在,无法修改.');
define('REASON_PRODUCT_TYPE_LAYOUT_KEY_ALREADY_EXISTS','prod-type-layout configuration_key "%s" 已经存在,无法插入');
define('REASON_INDEX_DOESNT_EXIST_TO_DROP','索引%s于表%s不存在,无法删除.');
define('REASON_PRIMARY_KEY_DOESNT_EXIST_TO_DROP','表%s的主关键字不存在,无法删除.');
define('REASON_INDEX_ALREADY_EXISTS','索引%s于表%s已存在,无法添加.');
define('REASON_PRIMARY_KEY_ALREADY_EXISTS','表%s主关键字已经存在,无法添加.');
define('REASON_NO_PRIVILEGES','用户 '.DB_SERVER_USERNAME.'@'.DB_SERVER.' 没有%s权限访问数据库 '.DB_DATABASE.'.');