From a3c54dd1b705878ec520e2f649f8edc760759fb5 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Fri, 10 Jul 2015 09:47:45 +1000 Subject: [PATCH] Add Oracle syntax (Senthil) --- ext/pdo/tests/bug65946.phpt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/pdo/tests/bug65946.phpt b/ext/pdo/tests/bug65946.phpt index 4b63a14bb5..af6088cea9 100644 --- a/ext/pdo/tests/bug65946.phpt +++ b/ext/pdo/tests/bug65946.phpt @@ -18,6 +18,9 @@ $db->exec('CREATE TABLE test(id int)'); $db->exec('INSERT INTO test VALUES(1)'); if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'firebird') { $sql = 'SELECT FIRST :limit * FROM test'; +} else if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci') { + //$sql = 'SELECT * FROM test FETCH FIRST :limit ROWS ONLY'; // Oracle 12c syntax + $sql = "select id from (select a.*, rownum rnum from (SELECT * FROM test) a where rownum <= :limit)"; } else { $sql = 'SELECT * FROM test LIMIT :limit'; } -- 2.40.0