mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-10-22 17:05:45 +02:00
BUGFIX: empty limit arrays filtered out
This commit is contained in:
parent
f6a5fa8925
commit
74954dc374
@ -1074,12 +1074,13 @@ class PostgreSQLDatabase extends Database {
|
|||||||
|
|
||||||
if($sqlQuery->limit) {
|
if($sqlQuery->limit) {
|
||||||
$limit = $sqlQuery->limit;
|
$limit = $sqlQuery->limit;
|
||||||
|
|
||||||
// Pass limit as array or SQL string value
|
// Pass limit as array or SQL string value
|
||||||
if(is_array($limit)) {
|
if(is_array($limit)) {
|
||||||
|
|
||||||
if(isset($limit['start']))
|
if(isset($limit['start']) && $limit['start']!='')
|
||||||
$text.=' OFFSET ' . $limit['start'];
|
$text.=' OFFSET ' . $limit['start'];
|
||||||
if(isset($limit['limit']))
|
if(isset($limit['limit']) && $limit['limit']!='')
|
||||||
$text.=' LIMIT ' . $limit['limit'];
|
$text.=' LIMIT ' . $limit['limit'];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user