Fix: No syntax error when when want no limit

This commit is contained in:
Laurent Destailleur 2013-03-05 13:28:31 +01:00
parent 215731dc59
commit de6d40237d
5 changed files with 5 additions and 0 deletions

View File

@ -508,6 +508,7 @@ class DoliDBMssql
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 ";

View File

@ -488,6 +488,7 @@ class DoliDBMysql
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 ";

View File

@ -490,6 +490,7 @@ class DoliDBMysqli
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 ";

View File

@ -700,6 +700,7 @@ class DoliDBPgsql
function plimit($limit=0,$offset=0)
{
global $conf;
if (empty($limit)) return "";
if ($limit < 0) $limit=$conf->liste_limit;
if ($offset > 0) return " LIMIT ".$limit." OFFSET ".$offset." ";
else return " LIMIT $limit ";

View File

@ -629,6 +629,7 @@ class DoliDBSqlite
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 ";