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 = "";