I’m having an issue with database queries in one of my applications since migrating to Rocket PHP. When running the below code, I used to get a record from the DB2 table split into the $subject, $authorname, $authorid, and $message variables; but now I’m getting NULL for each one. Here is the code that is experiencing the issue:
$query = "SELECT SUBJECT,AUTHOR,USERID,BODY FROM $_SESSION[DATABASE] WHERE NUMBER=$tm";
$dbh = new PDO($_SESSION['DB2SSID'],$_SESSION['APPID'],$_SESSION['APPPW'],array('PDO_ATTR_PERSISTENT' => false));
$sth = NULL;
$dbh = NULL;
I’ve tried using the actual column names instead of binding them by number and that didn’t help. I also tried converting from PDO::FETCH_BOUND to PDO::FETCH_ASSOC which fixed the first 3 columns, but it introduced a new problem where the 4th column wouldn’t come back because it is a CLOB. I think I need to keep using the bindColumn() and PDO::FETCH_BOUND to get the CLOB to retrieve properly. I’m not getting any bad completion codes after the database handle or statement objects are created.
Thank you for your help,
Please identify your exact tool version per instructions here and I will have someone look into this.
Here is the info:
Build Number: 0003
The results of a “php -v” are:
PHP 5.4.4 (cgi-fcgi) (built: Nov 19 2015 03:37:51) (DEBUG)
I confirm via our QA team that this is a known problem and it will be investigated by a developer soon. I will reply again to this post when there is news.
Great! Thank you for your help.