|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2009-03-25 15:32 UTC] sahib dot alejandro at gmail dot com
[2009-03-27 04:36 UTC] pierre dot php at gmail dot com
[2009-04-03 11:32 UTC] sahib dot alejandro at gmail dot com
[2009-06-12 21:08 UTC] kalle@php.net
[2021-09-04 10:11 UTC] mekristin8 at gmail dot com
[2021-09-09 13:39 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2021-09-09 13:39 UTC] cmb@php.net
[2021-09-19 04:22 UTC] pecl-dev at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 17:00:02 2025 UTC |
Description: ------------ PDO_INFORMIX bindValue(...) or bindParam(...) does not work as expected, there is no diference using prepare(...) with a direct sql query or a stored procedure query. It seems the binded value lose their value and if you're using these value in the WHERE clause then always fail the condition. Configuration: Ubuntu 8.10 Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4.1 with Suhosin-Patch Informix CSDK 3.50 UC.3DE.Linux IBM Informix Dynamic Server Version 10.00.FC4 PDO_INFORMIX driver 1.2.6 Reproduce code: --------------- mypdo1.php [using bindValue(...), DON'T WORK] <? $Pdo = new PDO('informix: host=myhost; server=myserver; protocol=onsoctcp; service=11000; database=empleados', 'user', 'password'); $Stmt = $Pdo->prepare('EXECUTE PROCEDURE test(?)'); $Stmt->bindValue(1, $sString); $sString = "myString"; $Stmt->execute(); $aRow = $Stmt->fetch(PDO::FETCH_NUM); echo '<pre>'; var_dump($aRow); echo '</pre>'; ?> mypdo2.php [using direct value in sql query, IT WORK] <? $Pdo = new PDO('informix: host=myhost; server=myserver; protocol=onsoctcp; service=11000; database=empleados', 'user', 'password'); $Stmt = $Pdo->prepare('EXECUTE PROCEDURE test("myString")'); $Stmt->execute(); $aRow = $Stmt->fetch(PDO::FETCH_NUM); echo '<pre>'; var_dump($aRow); echo '</pre>'; ?> Expected result: ---------------- Same result in both scripts array(2) { [0]=> string(9) "JARAMILLO" [1]=> string(3) "LEO" } Actual result: -------------- mypdo1.php array(2) { [0]=> NULL [1]=> NULL } mypdo2.php array(2) { [0]=> string(9) "JARAMILLO" [1]=> string(3) "LEO" }