将数据插入表中的查询打破了编码流程。
如何摆脱此异常:
PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'annual_spend'
代码:
INSERT INTO {mc_reward_accelarators} (`nid`,`reward_type_id`,`reward_level`, `percentage_spend`,`accelerator`,`annual_spend`,`inc_bonus_perce`,`first_year`,`language`) VALUES ('25','0','0','0','HP','','','0','en'),('25','0','0','0','FP','','','','en');
答案 0 :(得分:1)
试试这个
INSERT INTO {mc_reward_accelarators}
(
`nid`,
`reward_type_id`,
`reward_level`,
`percentage_spend`,
`accelerator`,
`annual_spend`,
`inc_bonus_perce`,
`first_year`,
`language`
)
VALUES
(
25,0,0,0,HP,,,0,en
),
(
25,0,0,0,FP,,,,en
);
避免在值中使用(')。