Created
May 22, 2017 17:46
-
-
Save mchelen/dc16290e011c575b3c92fb874f1b7008 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
PHP Warning: db2_bind_param(): Describe Param Failed | |
*/ | |
$conn = db2_connect('db', 'user', 'pass'); | |
$sql = " | |
SELECT * | |
FROM MYTABLE | |
WHERE FOO = '?' | |
"; | |
$foo = 'bar'; | |
$stmt = db2_prepare($conn, $sql); | |
db2_bind_param($stmt, 1, "foo", DB2_PARAM_IN); | |
if (db2_execute($stmt)) { | |
while ($row = db2_fetch_assoc($stmt)) { | |
var_dump($row); | |
} | |
} |
Are you connecting to a remote IBM i? We are having the same issue when we connect to a remote IBM i, and try to query a table in the IASP. If we query a table in *SYSBAS, db2_bind_param works just fine.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
line 11 should be:
WHERE FOO = ?