我一直在這個mysqli陳述卡住了一段時間。我看不出它有什麼問題,我可以得到顯示的錯誤,以便我可以看到我出錯的地方。mysqli準備聲明不起作用
你能幫我解決這個錯誤嗎?或者請向我解釋如何顯示錯誤,以便我可以修復它。
這是我的代碼
$add_record = $db->prepare('UPDATE vehicles SET name= ?, VINnum= ?, maker= ?, model= ?, color= ?, year= ?, oilChange= ?, registrationExp= ?, insuranceExp= ?, dailyRate= ?, weekleyRate= ?, monthleyRate= ?, currentMillage= ?, oilChangeMillage= ?, licensePlate= ?, vehicleCost= ? WHERE Vehicles_id = ?');
$add_record->bind_param('sssssisssdddsssdi', $name, $VIN, $maker, $model, $color, $year, $oilChange, $registration, $insurance, $dailyRate, $weekleyRate, $monthleyRate, $currentMillage, $changeOilMillage, $plate, $cost, $id);
if($add_record->execute()){
$pass_list = '<li>Good to go</li>';
} else {
$error_list .= '<li>SQL error</li>';
echo $db->error;
}
一旦你使用下面的變化得到錯誤,你能否讓我們知道一個編輯? – 2013-03-24 00:50:06