INSERT INTO soma_user_unit_booking (
uid, book_status, book_datetime, dom_id, from_date, to_date, from_time, to_time, event
) VALUES (
'4','1','2016-07-18 18:01:04','27','2016-07-20','2016-07-20','11:00','11:30','Booking'
)
for reference these image, in which i check and unchecked the paginate option in server database.
答案 0 :(得分:0)
尝试使用PDO。这是一个简单的例子:
try { $db = new PDO(DB_DRIVER . ":dbname=" . DB_DATABASE . ";host=" . DB_SERVER, DB_USER, DB_PASSWORD);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $db->prepare("INSERT INTO countries(name, capital, language) VALUES (:country, :capital, :language)");
$stmt->bindParam(':country', $country);
$stmt->bindParam(':capital', $capital);
$stmt->bindParam(':language', $language);
if($stmt->execute()) {
echo '1 row has been inserted';
}
$db = null;} catch(PDOException $e) {
trigger_error('Error occured while trying to insert into the DB:' . $e->getMessage(), E_USER_ERROR); }