Insert Statement为多行提供错误消息 - “表单中缺少值”

时间:2014-04-02 18:54:38

标签: php mysql sql

我正在尝试运行一批800插入语句,但收到错误消息"Missing value in the form"。如果我单独运行每个语句,它的工作正常。我已尝试对其进行故障排除,并发现如果:

  1. 如果我通过将行分隔符从;更改为:来编辑语句,那么它就可以了!此外,
  2. 如果我将Timestamp字段中的引用复制并粘贴到Data字段,那就可以了!
  3. 问题是我有800多个条目,必须有更好的方法!

    以下是代码示例:

    INSERT INTO `wp_cp_bp`(`uid`, `business_category_id`, `data`, `points`, `timestamp`) VALUES (17,17,"36",100,"2014-04-01 16:36:18");
    INSERT INTO `wp_cp_bp`(`uid`, `business_category_id`, `data`, `points`, `timestamp`) VALUES (17,22,"36",100,"2014-04-01 16:36:18");
    INSERT INTO `wp_cp_bp`(`uid`, `business_category_id`, `data`, `points`, `timestamp`) VALUES (3,5,"60",200,"2014-04-01 16:36:18");
    INSERT INTO `wp_cp_bp`(`uid`, `business_category_id`, `data`, `points`, `timestamp`) VALUES (2,7,"195",300,"2014-04-01 16:36:18");
    

0 个答案:

没有答案