|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-07-13 06:34 UTC] abhargav at in dot ibm dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 08:00:01 2025 UTC |
Description: ------------ db2_fetch_assoc() fails with "PHP Warning: db2_fetch_assoc() [<a href='function.db2-fetch-assoc'>function.db2-fetch- assoc</a>]: Cannot Determine LOB Size in ..." when a separate query with a different resource is executed in between fetches. Note that the dynamic_query column in the sample code below is of the type CLOB(65535) Reproduce code: --------------- $q1 = "SELECT f.dynamic_query FROM folders f"; $stmt1 = db2_prepare($db2, $q1); db2_execute($stmt1); var_dump($stmt1);var_dump("<br /> <br />"); while($i1 = db2_fetch_assoc($stmt1)) { var_dump($i1);var_dump("<br />inside while <br /><br />"); $q2 = "select CURRENT DATE from SYSIBM.SYSDUMMY1"; $stmt2 = db2_prepare($db2, $q2); $db2_execute($stmt2); var_dump($stmt2);var_dump("<br />After inner execute<br /><br />"); } var_dump("ok!"); Expected result: ---------------- NO WARNING in the php.log 50 var_dumps in the output like there are now only 2 inside while statements. See actual result below. Actual result: -------------- php.log: [12-Jul-2011 16:07:36] PHP Warning: db2_fetch_assoc() [<a href='function.db2-fetch-assoc'>function.db2-fetch- assoc</a>]: Cannot Determine LOB Size in /var/www/ent/sugarcrm/include/MVC/View/views/view.debug.php on line ... Output: resource(477) of type (DB2 Statement) string(13) " " array(1) { ["DYNAMIC_QUERY"]=> string(398) "SELECT emails.id polymorphic_id, 'Emails' polymorphic_module FROM emails JOIN emails_text on emails.id = emails_text.email_id WHERE (type = 'inbound' OR status = 'inbound') AND assigned_user_id = '39880860-ecae-de70-e6e4-4e14c07675ed' AND emails.deleted = '0' AND status NOT IN ('sent', 'archived', 'draft') AND type NOT IN ('out', 'archived', 'draft')" } string(31) " inside while " resource(478) of type (DB2 Statement) string(37) " After inner execute " array(1) { ["DYNAMIC_QUERY"]=> string(361) "SELECT emails.id polymorphic_id, 'Emails' polymorphic_module FROM emails JOIN emails_text on emails.id = emails_text.email_id WHERE (type = 'draft' OR status = 'draft') AND assigned_user_id = '39880860-ecae-de70-e6e4-4e14c07675ed' AND emails.deleted = '0' AND status NOT IN ('archived') AND type NOT IN ('archived')" } string(31) " inside while " resource(479) of type (DB2 Statement) string(37) " After inner execute " string(3) "ok!"