Moved to use the new limit_query() function

This commit is contained in:
jengo 2001-07-02 19:49:50 +00:00
parent 5b5d4d97b7
commit 8b9ff102bc
2 changed files with 16 additions and 13 deletions

View File

@ -57,7 +57,7 @@
$p->set_var('lang_delete',lang('Delete'));
$p->set_var('lang_view',lang('View'));
$account_info = $phpgw->accounts->get_list('accounts',$start,$sort, $order, $query, $total);
$account_info = $phpgw->accounts->get_list('accounts',$start,$sort,$order,$query);
if (! count($account_info))
{

View File

@ -86,15 +86,6 @@
{
global $phpgw, $phpgw_info;
if ($offset)
{
$limitclause = $phpgw->db->limit($start,$offset);
}
elseif ($start && !$offset)
{
$limitclause = $phpgw->db->limit($start);
}
if (! $sort)
{
$sort = "DESC";
@ -106,7 +97,7 @@
}
else
{
$orderclause = "ORDER BY account_lid,account_lastname,account_firstname ASC";
$orderclause = "ORDER BY account_lid ASC";
}
switch($_type)
@ -140,8 +131,20 @@
}
}
$sql = "SELECT * FROM phpgw_accounts $whereclause $orderclause $limitclause";
$this->db->query($sql,__LINE__,__FILE__);
$sql = "SELECT * FROM phpgw_accounts $whereclause $orderclause";
if ($offset)
{
$this->db->limit_query($sql,array($start,$offset),__LINE__,__FILE__);
}
elseif ($start == 0 || $start && !$offset)
{
$this->db->limit_query($sql,$start,__LINE__,__FILE__);
}
else
{
$this->db->query($sql,__LINE__,__FILE__);
}
while ($this->db->next_record()) {
$accounts[] = Array(
'account_id' => $this->db->f('account_id'),