我对此很陌生,并且尝试在附加组件中运行以下查询-Add Pages to More Information Sidebox

有谁看到我看不到的东西? PHPmyadmin在以下三个查询中的每一个中都显示许多意外的令牌问题!

Unexpected Tokens

查询1:

insert into configuration (configuration_title, configuration_key, configuration_value,
configuration_description, configuration_group_id, sort_order, last_modified, date_added,
use_function, set_function) values ('Define Page 5', 'DEFINE_PAGE_5_STATUS', '1', 'Enable
the Defined Page 5 Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define
Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', '25', '85',
now(), now(), NULL, 'zen_cfg_select_option(array(\'0\', \'1\', \'2\', \'3\'),');


查询2:

insert into configuration (configuration_title, configuration_key, configuration_value,
configuration_description, configuration_group_id, sort_order, last_modified, date_added,
use_function, set_function) values ('Define Page 6', 'DEFINE_PAGE_6_STATUS', '1', 'Enable
the Defined Page 6 Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define
Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', '25', '85',
now(), now(), NULL, 'zen_cfg_select_option(array(\'0\', \'1\', \'2\', \'3\'),');


查询3:

insert into configuration (configuration_title, configuration_key, configuration_value,
    configuration_description, configuration_group_id, sort_order, last_modified, date_added,
    use_function, set_function) values ('Define Page 7', 'DEFINE_PAGE_7_STATUS', '1', 'Enable
    the Defined Page 7 Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define
    Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', '25', '85',
    now(), now(), NULL, 'zen_cfg_select_option(array(\'0\', \'1\', \'2\', \'3\'),');


一定有我看不见的东西,但是我又是新来的!
预先感谢您的协助和/或指导!

最佳答案

问题出在INSERT语句最后插入数据zen_cfg_select_option上。

您应该'zen_cfg_select_option(array(\'0\', \'1\', \'2\', \'3\'),')
 'zen_cfg_select_option(array(\'0\', \'1\', \'2\', \'3\'))'的inetead

顺便说一句,您下次可能会在sql语句上设置排版,也许您会发现问题。

查询1

insert into configuration
(
    configuration_title,
    configuration_key,
    configuration_value,
    configuration_description,
    configuration_group_id,
    sort_order,
    last_modified,
    date_added,
    use_function,
    set_function
)
values
(
    'Define Page 5',
    'DEFINE_PAGE_5_STATUS',
    '1',
    'Enable the Defined Page 5 Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF',
    '25',
    '85',
    now(),
    now(),
    NULL,
    'zen_cfg_select_option(array(\'0\', \'1\', \'2\', \'3\')'
);


查询2

INSERT INTO configuration
(
    configuration_title,
    configuration_key,
    configuration_value,
    configuration_description,
    configuration_group_id,
    sort_order,
    last_modified,
    date_added,
    use_function,
    set_function
)
VALUES
(
    'Define Page 6',
    'DEFINE_PAGE_6_STATUS',
    '1',
    'Enable the Defined Page 6 Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF',
    '25',
    '85',
    now(),
    now(),
    NULL,
    'zen_cfg_select_option(array(\'0\', \'1\', \'2\', \'3\')'
);


查询3

INSERT INTO configuration
(
    configuration_title,
    configuration_key,
    configuration_value,
    configuration_description,
    configuration_group_id,
    sort_order,
    last_modified,
    date_added,
    use_function,
    set_function
)
VALUES
(
    'Define Page 7',
    'DEFINE_PAGE_7_STATUS',
    '1',
    'Enable the Defined Page 7 Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF',
    '25',
    '85',
    now(),
    now(),
    NULL,
    'zen_cfg_select_option(array(\'0\', \'1\', \'2\', \'3\'))'
);

关于mysql - 尝试为zencart运行SQL查询时出现意外的 token 问题,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/48758314/

10-11 03:31
查看更多