Qual: Moved duplicate method to base method
This commit is contained in:
parent
16ede7c52c
commit
98120862f7
@ -174,6 +174,22 @@ abstract class DoliDB implements Database
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Define limits and offset of request
|
||||
*
|
||||
* @param int $limit Maximum number of lines returned (-1=conf->liste_limit, 0=no limit)
|
||||
* @param int $offset Numero of line from where starting fetch
|
||||
* @return string String with SQL syntax to add a limit and offset
|
||||
*/
|
||||
function plimit($limit=0,$offset=0)
|
||||
{
|
||||
global $conf;
|
||||
if (empty($limit)) return "";
|
||||
if ($limit < 0) $limit=$conf->liste_limit;
|
||||
if ($offset > 0) return " LIMIT $offset,$limit ";
|
||||
else return " LIMIT $limit ";
|
||||
}
|
||||
|
||||
/**
|
||||
* Return version of database server into an array
|
||||
*
|
||||
|
||||
@ -466,24 +466,6 @@ class DoliDBMssql extends DoliDB
|
||||
if (is_resource($resultset)) mssql_free_result($resultset);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Define limits and offset of request
|
||||
*
|
||||
* @param int $limit Maximum number of lines returned (-1=conf->liste_limit, 0=no limit)
|
||||
* @param int $offset Numero of line from where starting fetch
|
||||
* @return string String with SQL syntax to add a limit and offset
|
||||
*/
|
||||
function plimit($limit=0,$offset=0)
|
||||
{
|
||||
global $conf;
|
||||
if (empty($limit)) return "";
|
||||
if ($limit < 0) $limit=$conf->liste_limit;
|
||||
if ($offset > 0) return " LIMIT $offset,$limit ";
|
||||
else return " LIMIT $limit ";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Escape a string to insert data
|
||||
*
|
||||
|
||||
@ -365,24 +365,6 @@ class DoliDBMysql extends DoliDB
|
||||
if (is_resource($resultset)) mysql_free_result($resultset);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Define limits and offset of request
|
||||
*
|
||||
* @param int $limit Maximum number of lines returned (-1=conf->liste_limit, 0=no limit)
|
||||
* @param int $offset Numero of line from where starting fetch
|
||||
* @return string String with SQL syntax to add a limit and offset
|
||||
*/
|
||||
function plimit($limit=0,$offset=0)
|
||||
{
|
||||
global $conf;
|
||||
if (empty($limit)) return "";
|
||||
if ($limit < 0) $limit=$conf->liste_limit;
|
||||
if ($offset > 0) return " LIMIT $offset,$limit ";
|
||||
else return " LIMIT $limit ";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Escape a string to insert data
|
||||
*
|
||||
|
||||
@ -376,24 +376,6 @@ class DoliDBMysqli extends DoliDB
|
||||
if (is_object($resultset)) mysqli_free_result($resultset);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Define limits and offset of request
|
||||
*
|
||||
* @param int $limit Maximum number of lines returned (-1=conf->liste_limit, 0=no limit)
|
||||
* @param int $offset Numero of line from where starting fetch
|
||||
* @return string String with SQL syntax to add a limit and offset
|
||||
*/
|
||||
function plimit($limit=0,$offset=0)
|
||||
{
|
||||
global $conf;
|
||||
if (empty($limit)) return "";
|
||||
if ($limit < 0) $limit=$conf->liste_limit;
|
||||
if ($offset > 0) return " LIMIT $offset,$limit ";
|
||||
else return " LIMIT $limit ";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Escape a string to insert data
|
||||
*
|
||||
|
||||
@ -510,24 +510,6 @@ class DoliDBSqlite extends DoliDB
|
||||
if (is_object($resultset)) $resultset->closeCursor();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Define limits and offset of request
|
||||
*
|
||||
* @param int $limit Maximum number of lines returned (-1=conf->liste_limit, 0=no limit)
|
||||
* @param int $offset Numero of line from where starting fetch
|
||||
* @return string String with SQL syntax to add a limit and offset
|
||||
*/
|
||||
function plimit($limit=0,$offset=0)
|
||||
{
|
||||
global $conf;
|
||||
if (empty($limit)) return "";
|
||||
if ($limit < 0) $limit=$conf->liste_limit;
|
||||
if ($offset > 0) return " LIMIT $offset,$limit ";
|
||||
else return " LIMIT $limit ";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Escape a string to insert data
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user