语法错误...找不到它

时间:2014-07-09 12:48:54

标签: php sql syntax pdo syntax-error

下面的SQL语法中有一个错误,据说是在最后一行(结束:“));”)根据抛出的错误。我看不出有什么不对。这里有人发现它吗?

没有抛出其他错误。只是语法错误。但是,它声明“......在''...附近使用正确的语法”,但引用第244行,即执行结束。

$save = $database->prepare('INSERT INTO checklists VALUES(:id, :name, :user, :agent, :status, :date_created, :date_submitted, :last_updated, :technique, :machine, :ink, :finish, :item, :thickness, :rolls, :sheets, :deformation, :deformation_details, :surface, :surface_details, :process, :process_details, :quality, :quality_details, :drying, :drying_details, :finishing, :finishing_details, :reason, :how, :uid');
$save->execute(array(
    ':id' => ' ',
    ':name' => $name,
    ':user' => $printer,
    ':agent' => $agent,
    ':status' => '0',
    ':date_created' => $stamp,
    ':date_submitted' => $sub,
    ':last_updated' => $stamp,
    ':technique' => '',
    ':machine' => '',
    ':ink' => '',
    ':finish' => '',
    ':item' => '',
    ':thickness' => '',
    ':rolls' => '',
    ':sheets' => '',
    ':deformation' => '',
    ':deformation_details' => '',
    ':surface' => '',
    ':surface_details' => '',
    ':process' => '',
    ':process_details' => '',
    ':quality' => '',
    ':quality_details' => '',
    ':drying' => '',
    ':drying_details' => '',
    ':finishing' => '',
    ':finishing_details' => '',
    ':reason' => '',
    ':how' => '',
    ':uid' => $uid
));

1 个答案:

答案 0 :(得分:5)

广告中缺少)个广告:

... :reason, :how, :uid)');