mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-03 17:54:41 +02:00
change pagination class
This commit is contained in:
parent
e99108a34a
commit
37f72d881e
11 changed files with 62 additions and 57 deletions
|
@ -27,10 +27,10 @@ switch ($action) {
|
|||
|
||||
$name = _post('name');
|
||||
if ($name != '') {
|
||||
$paginator = Paginator::bootstrap('tbl_routers', 'name', '%' . $name . '%');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_routers'), ['name' => '%' . $name . '%'], $name);
|
||||
$d = ORM::for_table('tbl_routers')->where_like('name', '%' . $name . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
} else {
|
||||
$paginator = Paginator::bootstrap('tbl_routers');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_routers'));
|
||||
$d = ORM::for_table('tbl_routers')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue