Req #77863 [Opn->Csd]: PDO firebird support type Boolean in input parameters

From: Date: Tue, 10 Sep 2019 07:24:37 +0000
Subject: Req #77863 [Opn->Csd]: PDO firebird support type Boolean in input parameters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222677@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77863&edit=1 ID: 77863 Updated by: cmb@php.net Reported by: sim-mail at list dot ru Summary: PDO firebird support type Boolean in input parameters -Status: Open +Status: Closed Type: Feature/Change Request Package: PDO Firebird Operating System: any PHP Version: 7.3.4 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Closed by <http://git.php.net/?p=php-src.git;a=commit;h=481f89551eab4f455cb72e421cd18a9f961311dd>. Previous Comments: ------------------------------------------------------------------------ [2019-04-07 12:12:10] The following pull request has been associated: Patch Name: Request #77863 Add support boolean datatype for PDO Firebird in input parameters On GitHub: https://github.com/php/php-src/pull/4014 Patch: https://github.com/php/php-src/pull/4014.patch ------------------------------------------------------------------------ [2019-04-07 11:42:07] sim-mail at list dot ru Description: ------------ PDO firebird does not support type Boolean in input parameters Test script: --------------- $sql = <<<SQL with t(b, s) as ( select true, 'true' from rdb\$database union all select false, 'false' from rdb\$database union all select unknown, 'unknown' from rdb\$database ) select trim(s) as s from t where b is not distinct from :p SQL; require 'testdb.inc'; $db = new PDO('firebird:dbname='.$test_base, $user, $password) or die; try { // PDO::PARAM_BOOL $query = $db->prepare($sql); $query->bindValue('p', 0, PDO::PARAM_BOOL); $query->execute(); var_dump($query->fetchColumn(0)); $query->bindValue('p', 1, PDO::PARAM_BOOL); $query->execute(); var_dump($query->fetchColumn(0)); $query->bindValue('p', false, PDO::PARAM_BOOL); $query->execute(); var_dump($query->fetchColumn(0)); $query->bindValue('p', true, PDO::PARAM_BOOL); $query->execute(); var_dump($query->fetchColumn(0)); echo "OK\n"; } catch(Exception $e) { echo $e->getMessage() . '<br>'; echo $e->getTraceAsString(); } Expected result: ---------------- string(5) "false" string(4) "true" string(5) "false" string(4) "true" OK ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77863&edit=1

« previous php.bugs (#222677) next »