我尝试使用ajax使用PDO语句插入值。但每次它抛出mysql错误。缺少一些东西!
$st = $pdo->prepare('INSERT INTO payment_tbl (user_id, payment_mode, bank_name, cheque_no, pending_amt)
VALUES( :user_id, :payment_mode, :bank_name, :cheque_no, :pending_amt )');
$st->bindParam('user_id' , $user_id);
$st->bindParam('payment_mode' , $pmode1);
$st->bindParam('bank_name' , $bank_name1);
$st->bindParam('cheque_no' , $cheque_no1);
$st->bindParam('paid_amt' , $paid_amt1);
$st->execute();
答案 0 :(得分:0)
看起来像是一个错字的简单问题。应
$st->bindParam('paid_amt' , $paid_amt1);
是
$st->bindParam('pending_amt' , $pending_amt);
代替?