forked from extern/egroupware
Fixed limit(), I must have been a sleep when I wrote the function :)
This commit is contained in:
parent
8345e26b12
commit
81c7d0be94
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user