Update database.php

This commit is contained in:
Namhyeon Go 2018-03-19 15:18:25 +09:00 committed by GitHub
parent b5e87dbb2d
commit 0c682b6dc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,7 +136,7 @@ if(!function_exists("exec_db_fetch_all")) {
if($stmt->execute() && $stmt->rowCount() > 0) {
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
}
return $rows;
}
}
@ -159,6 +159,12 @@ if(!function_exists("exec_db_fetch")) {
}
}
if(!function_exists("get_value_in_array")) {
function get_value_in_array($name, $arr=array(), $default=0) {
return array_key_empty($name, $arr) ? $default : $arr[$name];
}
}
if(!function_exists("get_page_range")) {
function get_page_range($page=1, $limit=0) {
$append_sql = "";