#47898 [NEW]: PDO closeCursor

From: Date: Sun, 05 Apr 2009 10:14:54 +0000
Subject: #47898 [NEW]: PDO closeCursor
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-2080@lists.php.net to get a copy of this message
From:             riksoft at gmail dot com
Operating system: Windows XP
PHP version:      Irrelevant
PHP Bug Type:     Documentation problem
Bug description:  PDO closeCursor

Description:
------------
From manual page: pdostatement.closecursor you can read:

"This method is useful for database drivers that do not support executing
a PDOStatement object when a previously executed PDOStatement object still
has unfetched rows. If your database driver suffers from this limitation,
the problem may manifest itself in an out-of-sequence error."

This implicitly means that if I want to fetch 2 resultset at the same
time, I must establish 2 connection. Right?

But whatever the case, since that an important resource and performance
issue, should be nice to have a list of such database (those with the
problem described) to make a decision on using closeCursor or cut support
for those database in the project.

We need at least a basic list of most important DB: MySql, Sqlite,
pgSql....



Also in page documenting PDO Query (pdo.query.php)

"If you do not fetch all of the data in a result set before issuing your
next call to PDO::query(), your call may fail. Call
PDOStatement::closeCursor() to release the database resources associated
with the PDOStatement object before issuing your next call to
PDO::query()."

Very uningegneristic statement: "your call may fail"! Where? I need to
know where I can avoid because is a pretty bottleneck... if not, why it
isn't enclosed by design in every execute/query?

Reproduce code:
---------------
---
From manual page: pdostatement.closecursor
---



-- 
Edit bug report at http://bugs.php.net/?id=47898&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        http://bugs.php.net/fix.php?id=47898&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        http://bugs.php.net/fix.php?id=47898&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        http://bugs.php.net/fix.php?id=47898&r=trysnapshot60
Fixed in CVS:                        http://bugs.php.net/fix.php?id=47898&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47898&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=47898&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=47898&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=47898&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=47898&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=47898&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=47898&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=47898&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=47898&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=47898&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47898&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47898&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=47898&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=47898&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=47898&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=47898&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=47898&r=mysqlcfg



Thread (2 messages)

« previous php.doc.bugs (#2080) next »