Update database.php
This commit is contained in:
parent
a269fd0ecd
commit
c030fe1fba
|
@ -141,6 +141,24 @@ if(!function_exists("exec_db_fetch_all")) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!function_exists("exec_db_fetch")) {
|
||||||
|
function exec_db_fetch($sql, $bind=array(), $bind_limit=true) {
|
||||||
|
$row = NULL;
|
||||||
|
$rows = array();
|
||||||
|
|
||||||
|
if($bind_limit == true) {
|
||||||
|
$sql = $sql . " limit 1";
|
||||||
|
}
|
||||||
|
|
||||||
|
$rows = exec_db_fetch_all($sql, $bind);
|
||||||
|
if(count($rows) > 0) {
|
||||||
|
$row = $rows[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(!function_exists("get_page_range")) {
|
if(!function_exists("get_page_range")) {
|
||||||
function get_page_range($page=1, $limit=0) {
|
function get_page_range($page=1, $limit=0) {
|
||||||
$append_sql = "";
|
$append_sql = "";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user