From 1ee91a710c64796fe626094c745e5056723e53ef Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Thu, 9 Jan 2020 21:34:25 +0900 Subject: [PATCH] Update database.php --- system/database.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/database.php b/system/database.php index 46e644b..aa0b284 100644 --- a/system/database.php +++ b/system/database.php @@ -166,11 +166,15 @@ if(!check_function_exists("exec_db_query")) { // commit transaction $dbc->commit(); + + // get errors + $errors = $stmt->errorInfo(); // if failed if(!$flag) { write_common_log(get_hashed_text($sql), "DATABASE-FAILED-EXECUTE"); write_common_log($sql, "DATABASE-FAILED-QUERY"); + write_common_log(implode(",", $errors), "DATABASE-FAILED-ERROR"); } return $flag;