From 0c682b6dc48bd2d591bb047a6c396534475f969a Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Mon, 19 Mar 2018 15:18:25 +0900 Subject: [PATCH] Update database.php --- system/database.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/system/database.php b/system/database.php index 6213654..a5b4ddc 100644 --- a/system/database.php +++ b/system/database.php @@ -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 = "";