Fixed limit(), I must have been a sleep when I wrote the function :)

This commit is contained in:
jengo 2001-01-30 00:12:27 +00:00
parent 8345e26b12
commit 81c7d0be94
2 changed files with 10 additions and 6 deletions

View File

@ -97,12 +97,14 @@ class db {
return mysql_close($this->Link_ID); return mysql_close($this->Link_ID);
} }
function limit($start,$offset) function limit($start)
{ {
global $phpgw_info;
if ($start == 0) { if ($start == 0) {
$s = "limit $offset"; $s = "limit " . $phpgw_info["user"]["preferences"]["common"]["maxmatchs"];
} else { } else {
$s = "limit $start,$offset"; $s = "limit $start," . $phpgw_info["user"]["preferences"]["common"]["maxmatchs"];
} }
return $s; return $s;
} }

View File

@ -61,12 +61,14 @@ class db {
} }
} }
function limit($start,$offset) function limit($start)
{ {
global $phpgw_info;
if ($start == 0) { if ($start == 0) {
$s = "limit $offset"; $s = "limit " . $phpgw_info["user"]["preferences"]["common"]["maxmatchs"];
} else { } else {
$s = "limit $offset,$start"; $s = "limit " . $phpgw_info["user"]["preferences"]["common"]["maxmatchs"] . ",$start";
} }
return $s; return $s;
} }