Update database.php

This commit is contained in:
Namhyeon Go 2020-01-09 20:23:27 +09:00 committed by GitHub
parent 1584001aaf
commit c3840a10de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -287,7 +287,7 @@ if(!check_function_exists("exec_db_fetch")) {
} elseif($fetch_mode == "php") {
$_sql = $sql;
$_rows = exec_db_fetch_all($sql, $bind);
$_rows = array_slice($_rows, $start, 1);
$_rows = array_slice($_rows, get_db_zero($start), 1);
}
// get first of rows
@ -304,9 +304,9 @@ if(!check_function_exists("get_page_range")) {
$page = ($page > 1 ? $page : 1);
if($limit > 0) {
$_START = ($page - 1) * $limit;
$_LIMIT = $limit;
$sql = sprintf(" limit %s, %s", get_db_zero($_START), $_LIMIT);
$_START = get_db_zero(($page - 1) * $limit);
$_LIMIT = get_db_zero($limit);
$sql = sprintf(" limit %s, %s", $_START, $_LIMIT);
}
return $sql;