Update database.php
This commit is contained in:
parent
b99e45ee48
commit
678958992b
|
|
@ -213,6 +213,10 @@ 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 = "";
|
||||||
|
|
||||||
|
if($page < 1) {
|
||||||
|
$page = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if($limit > 0) {
|
if($limit > 0) {
|
||||||
$record_start = ($page - 1) * $limit;
|
$record_start = ($page - 1) * $limit;
|
||||||
$record_end = $record_start + $limit - 1;
|
$record_end = $record_start + $limit - 1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user