Permalink
Browse files

Compatibility with Firebird & Oracle select syntax.

  • Loading branch information...
1 parent 88c1491 commit eb33d08f1eff9e890dc95f1a6442f293d2258038 @madorin madorin committed with weltling Dec 17, 2016
Showing with 6 additions and 2 deletions.
  1. +6 −2 ext/pdo/tests/bug_60665.phpt
@@ -13,8 +13,12 @@ PDOTest::skip();
if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/');
require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
$db = PDOTest::factory();
-
-$statement = $db->prepare("SELECT NULL AS null_value, 0 AS zero, 1 AS one");
+switch ($db->getAttribute(PDO::ATTR_DRIVER_NAME)) {
+ case 'oci': $from = 'from dual'; break;
+ case 'firebird': $from = 'from rdb$database'; break;
+ default: $from = ''; break;
+}
+$statement = $db->prepare("SELECT NULL AS null_value, 0 AS zero, 1 AS one $from");
$statement->execute();
$row = $statement->fetch(PDO::FETCH_LAZY);
var_dump(

0 comments on commit eb33d08

Please sign in to comment.