消息为“ SQLSTATE [21S01]”的未捕获异常“ PDOException”:插入值列表与列列表不匹配:1136

时间:2019-02-20 10:18:53

标签: php mysql pdo

这是我的查询,在开发模式下一切正常,但在生产中会出错。

<?php

$sql = "INSERT INTO `order_utm` VALUES('',:order_id,:utm_source,:utm_campaign,:utm_medium,:tim)";
$result = $this->query($sql, 'insert', array(
    'order_id' => $trans_id,
    'utm_source' => $utm_source,
    'utm_campaign' => $utm_campaign,
    'utm_medium' => $utm_medium,
    'tim' => time()
));

0 个答案:

没有答案