Skip to content

Commit e0e71cd

Browse files
committed
bind PK
1 parent 96ef441 commit e0e71cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Database/Adapter/MariaDB.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,13 +1535,13 @@ public function find(string $collection, array $queries = [], ?int $limit = 25,
15351535

15361536
// Build pagination WHERE clause only if we have a cursor
15371537
if (!empty($cursor)) {
1538-
// Special case: only 1 attribute and it's a unique primary key
1538+
// Special case: No tie breaks. only 1 attribute and it's a unique primary key
15391539
if (count($orderAttributes) === 1 && $i === 0 && $originalAttribute === '$sequence') {
15401540
$operator = ($direction === Database::ORDER_DESC)
15411541
? Query::TYPE_LESSER
15421542
: Query::TYPE_GREATER;
15431543

1544-
$bindName = "cursor_pk";
1544+
$bindName = ":cursor_pk";
15451545
$binds[$bindName] = $cursor[$originalAttribute];
15461546

15471547
$cursorWhere[] = "{$this->quote($alias)}.{$this->quote($attribute)} {$this->getSQLOperator($operator)} {$bindName}";

0 commit comments

Comments
 (0)