com php-src: Compatibility with Firebird & Oracle select syntax.: ext/pdo/tests/bug_60665.phpt

From: Date: Mon, 19 Dec 2016 00:06:24 +0000
Subject: com php-src: Compatibility with Firebird & Oracle select syntax.: ext/pdo/tests/bug_60665.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96376@lists.php.net to get a copy of this message
Commit: eb33d08f1eff9e890dc95f1a6442f293d2258038 Author: Dorin Marcoci <dorin.marcoci@marcodor.com> Sat, 17 Dec 2016 21:34:32 +0200 Committer: Anatol Belski <ab@php.net> Mon, 19 Dec 2016 01:06:24 +0100 Parents: 88c1491c6df350b565c3f88013ec31a996043f5d Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=eb33d08f1eff9e890dc95f1a6442f293d2258038 Log: Compatibility with Firebird & Oracle select syntax. Changed paths: M ext/pdo/tests/bug_60665.phpt Diff: diff --git a/ext/pdo/tests/bug_60665.phpt b/ext/pdo/tests/bug_60665.phpt index 28c1482..bae3d60 100644 --- a/ext/pdo/tests/bug_60665.phpt +++ b/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(

« previous php.cvs (#96376) next »