我試圖運行此PDO預處理語句PDO預處理語句未捕獲的異常錯誤消息
$stmt = $pdo_conn->prepare(
"INSERT into email_attachments (email_seq, attachment)
values (:email_seq, :attachment) ");
$stmt->execute(array(
':email_seq' => $admin_email_sequence,
':attachment' => $_SERVER["DOCUMENT_ROOT"].'/'.$settings["ticket_files_folder"].'/'.$ticketnumber.'-'.$currentDate.'-'.$at[filename], $at[attachment]
));
,但我得到這個錯誤:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens' in /home/integra/public_html/autocheck/support_emails.php:662 Stack trace: #0 /home/integra/public_html/autocheck/support_emails.php(662): PDOStatement->execute(Array) #1 {main} thrown in /home/integra/public_html/autocheck/support_emails.php on line 662
什麼不明確錯誤消息? – PeeHaa