Update database.php

This commit is contained in:
Namhyeon Go 2018-06-25 16:32:14 +09:00 committed by GitHub
parent b99e45ee48
commit 678958992b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,7 +212,11 @@ if(!function_exists("exec_db_fetch")) {
if(!function_exists("get_page_range")) {
function get_page_range($page=1, $limit=0) {
$append_sql = "";
if($page < 1) {
$page = 1;
}
if($limit > 0) {
$record_start = ($page - 1) * $limit;
$record_end = $record_start + $limit - 1;