Make sqlite limit statement more different than mysql limit statement

This commit is contained in:
Timothy Warren 2014-03-26 21:19:24 -04:00
parent 50cfa0f888
commit 3a16f3c65b

View File

@ -31,12 +31,14 @@ class SQLite_SQL implements iDB_SQL {
*/
public function limit($sql, $limit, $offset=FALSE)
{
if ( ! is_numeric($offset))
$sql .= "\nLIMIT {$limit}";
if (is_numeric($offset))
{
return $sql."\nLIMIT {$limit}";
$sql .= " OFFSET {$offset}";
}
return $sql."\nLIMIT {$limit} OFFSET {$offset}";
return $sql;
}
// --------------------------------------------------------------------------