mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 17:14:36 +01:00
Moved sql_limit() to the db classes and renamed it to limit()
This commit is contained in:
parent
6c15e4a6d3
commit
9505b365d6
@ -447,13 +447,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
function navbar($called_directly = True)
|
||||
function navbar()
|
||||
{
|
||||
// This is only temp, until will change everything to use the new method
|
||||
if ($called_directly) {
|
||||
echo '<center><b>Warning: You can no longer call navbar() directly, use echo parse_navbar() from now on.</b></center>';
|
||||
}
|
||||
|
||||
global $phpgw_info, $phpgw;
|
||||
|
||||
$phpgw_info["navbar"]["home"]["title"] = "Home";
|
||||
|
@ -97,6 +97,16 @@ class db {
|
||||
return mysql_close($this->Link_ID);
|
||||
}
|
||||
|
||||
function limit($start,$offset)
|
||||
{
|
||||
if ($start == 0) {
|
||||
$s = "limit $start";
|
||||
} else {
|
||||
$s = "limit $start,$offset";
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
/* public: discard the query result */
|
||||
function free() {
|
||||
@mysql_free_result($this->Query_ID);
|
||||
|
@ -61,6 +61,16 @@ class db {
|
||||
}
|
||||
}
|
||||
|
||||
function limit($start,$offset)
|
||||
{
|
||||
if ($start == 0) {
|
||||
$s = "limit $offset";
|
||||
} else {
|
||||
$s = "limit $offset,$start";
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
// This only affects systems not using persistant connections
|
||||
function disconnect()
|
||||
{
|
||||
|
@ -324,8 +324,14 @@ class nextmatchs
|
||||
|
||||
// Postgre and MySQL switch the vars in limit. This will make it easier
|
||||
// if there are any other databases that pull this.
|
||||
|
||||
// NOTE!! This is is NO longer used. Use db->limit() instead.
|
||||
// This is here for people to get there code up to date.
|
||||
|
||||
function sql_limit($start)
|
||||
{
|
||||
echo "<center><b>WARNING:</b> Do not use sql_limit() anymore. Use db->limit() from now on.</center>";
|
||||
|
||||
global $phpgw_info;
|
||||
$max = $phpgw_info["user"]["preferences"]["common"]["maxmatchs"];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user