Update database.php

This commit is contained in:
Namhyeon Go 2018-05-29 15:38:09 +09:00 committed by GitHub
parent 177fe78877
commit 2223c25245
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -311,5 +311,14 @@ if(!function_exists("json_decode_to_assoc")) {
}
}
// close db connection
if(!function_exists("close_db_connect")) {
function close_db_connect() {
$dbc = get_scope("dbc");
$dbc->close();
set_scope("dbc", null);
}
}
// set scope dbc
set_scope("dbc", get_db_connect());