[PECL-BUG] Bug #16074 [Opn]: pdo_informix bindValue(...) does not work correctly
[email protected] ("sahib dot alejandro at gmail dot com")
| Newsgroups | php.pear.webmaster |
|---|---|
| Message-ID | <[email protected]> |
Edit report at http://pecl.php.net/bugs/bug.php?id=16074&edit=1
ID: 16074
User updated by: sahib dot alejandro at gmail dot com
-Summary: pdo_informix bidValue(...) does not work correctly
Reported By: sahib dot alejandro at gmail dot com
Status: Open
Id: 16074
Type: Bug
Package: Bug System
Operating System: Ubuntu 8.10
PHP Version: 5.2.6
New Comment:
sorry there is "bindValue(...)" at the title, finger mistake.
Previous Comments:
------------------------------------------------------------------------
[2009-03-25 14:24:11] sahib dot alejandro at gmail dot com
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"
}
------------------------------------------------------------------------
--
Edit this bug report at http://pecl.php.net/bugs/bug.php?id=16074&edit=1