Update database.php

This commit is contained in:
Namhyeon Go 2020-01-09 21:34:25 +09:00 committed by GitHub
parent 384ecc9ed4
commit 1ee91a710c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;