我一直坚持这个mysqli statment。我看不出它有什么问题,我可以显示错误,这样我就可以看到哪里出错了。
你能帮我解决这个错误吗,或者请向我解释如何显示错误,以便我修复它。
这是我的代码
$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;
}