這一切都讓我堅持用這個簡單的預處理語句日:PHP-PDO_PGSQL - SQLSTATE [HY093]:無效的參數號
// $conn it's my PDO Object
// and $intervention my params'array
$s = $conn->prepare("INSERT INTO intervention(firm_id,category,subject,amount,start_date,end_date) VALUES(:firm_id,':category',':subject',:amount,':start_date',':end_date')");
$result = $s->execute(array(
'firm_id' => $firm_id ,
'category' => $intervention["category"] ,
'subject' => $intervention["subject"] ,
'amount'=> $intervention["amount"] ,
'start_date'=> $intervention["start_date"],
'end_date'=>$intervention["end_date"]
));
的執行所會給我:
警告:PDOStatement :: execute():SQLSTATE [HY093]:無效的參數編號:::類別
有人可以幫我解開d這個簡單的代碼有什麼問題?
Ops ...非常感謝的人! –