mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-10-01 01:26:10 -04:00
handle LIMIT
in oci
Co-authored-by: Austin Huang <im@austinhuang.me>
This commit is contained in:
parent
0c4852c099
commit
535f038daa
@ -913,7 +913,10 @@ class Database extends AbstractData
|
|||||||
case '0.21':
|
case '0.21':
|
||||||
// create the meta column if necessary (pre 0.21 change)
|
// create the meta column if necessary (pre 0.21 change)
|
||||||
try {
|
try {
|
||||||
self::$_db->exec('SELECT "meta" FROM "' . self::_sanitizeIdentifier('paste') . '" LIMIT 1');
|
self::$_db->exec(
|
||||||
|
'SELECT "meta" FROM "' . self::_sanitizeIdentifier('paste') . '" ' .
|
||||||
|
(self::$_type === 'oci' ? 'FETCH NEXT 1 ROWS ONLY' : 'LIMIT 1')
|
||||||
|
);
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
self::$_db->exec('ALTER TABLE "' . self::_sanitizeIdentifier('paste') . '" ADD COLUMN "meta" TEXT');
|
self::$_db->exec('ALTER TABLE "' . self::_sanitizeIdentifier('paste') . '" ADD COLUMN "meta" TEXT');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user