有没有别的办法把这么多数据插入我的数据库?
我的错误消息-警告:mysqli\u error()只需要1个参数,第35行的e:\xampp\htdocs\hotel\admin\confirm\u checkoutdetails.php中给出了0
$conn->query("INSERT INTO `checkout_report` (fullname, email_address, address, contact_no, purposeofstay, position, adults, children, room_type, room_no, room_price, days, extra_bed, checkin, bookcheckin_time, checkout, bookcheckout_time, generate_code, total_amount, payment_date, payment_method, payment_status)
VALUES('$fullname', '$email_address', '$address', '$contact_no', '$purposeofstay', '$position', '$adults', '$children', '$room_type', '$room_no', '$room_price', '$days', '$extra_bed', '$checkin', '$bookcheckin_time', '$checkout', '$bookcheckout_time', '$generate_code', '$total_amount', '$payment_date', '$payment_method', '$payment_status')") or die(mysqli_error());
1条答案
按热度按时间ffscu2ro1#
在中生成错误时,需要包含要使用的连接
mysqli_error()
. 请看这篇文章的正确使用方法。