Removed the array from limit_query()

This commit is contained in:
jengo 2001-07-08 04:17:28 +00:00
parent 59874ad788
commit 3b28be028f
4 changed files with 12 additions and 26 deletions

View File

@ -134,7 +134,7 @@
$sql = "SELECT * FROM phpgw_accounts $whereclause $orderclause";
if ($offset)
{
$this->db->limit_query($sql,array($start,$offset),__LINE__,__FILE__);
$this->db->limit_query($sql,$start,__LINE__,__FILE__,$offset);
}
elseif ($start == 0 || $start && !$offset)
{

View File

@ -73,25 +73,21 @@ class db {
return $this->Query_ID;
}
function limit_query($Query_String, $_offset, $line = '', $file = '')
// public: perform a query with limited result set
function limit_query($Query_String, $offset, $line = '', $file = '', $num_rows = '')
{
global $phpgw_info;
if (! $num_rows)
{
$num_rows = $phpgw_info['user']['preferences']['common']['maxmatchs'];
}
if ($this->Debug)
{
printf("Debug: limit_query = %s<br>offset=%d, num_rows=%d<br>\n", $Query_String, $offset, $num_rows);
}
if (is_array($_offset))
{
list($offset,$num_rows) = $_offset;
}
else
{
$num_rows = $phpgw_info['user']['preferences']['common']['maxmatchs'];
$offset = $_offset;
}
$this->query($Query_String, $line, $file);
if ($this->Query_ID)
{

View File

@ -168,18 +168,13 @@ class db {
}
// public: perform a query with limited result set
function limit_query($Query_String, $_offset, $line = '', $file = '')
function limit_query($Query_String, $offset, $line = '', $file = '', $num_rows = '')
{
global $phpgw_info;
if (is_array($_offset))
{
list($offset,$num_rows) = $_offset;
}
else
if (! $num_rows)
{
$num_rows = $phpgw_info['user']['preferences']['common']['maxmatchs'];
$offset = $_offset;
}
if ($offset == 0)

View File

@ -112,18 +112,13 @@ class db {
}
// public: perform a query with limited result set
function limit_query($Query_String, $_offset, $line = '', $file = '')
function limit_query($Query_String, $offset, $line = '', $file = '', $num_rows = '')
{
global $phpgw_info;
if (is_array($_offset))
{
list($offset,$num_rows) = $_offset;
}
else
if (! $num_rows)
{
$num_rows = $phpgw_info['user']['preferences']['common']['maxmatchs'];
$offset = $_offset;
}
if ($offset == 0)