Bug #55826 [Opn->Ana]: Multiple PDORow's

From: Date: Fri, 30 Sep 2011 23:07:50 +0000
Subject: Bug #55826 [Opn->Ana]: Multiple PDORow's
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-164013@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55826&edit=1 ID: 55826 Updated by: johannes@php.net Reported by: grinyad at mail dot ru Summary: Multiple PDORow's -Status: Open +Status: Analyzed Type: Bug Package: PDO related Operating System: Windows XP PHP Version: 5.3.8 Block user comment: N Private report: N New Comment: The issue here is that PDORow contains a pointer to the actual statement instance which is used to receive the data and is then shared over the PDOStatement instance and all PDORows created from there. Changing this is a large change wa can't do for 5.4, which is in beta. Given other issues in there (see recent bug about serialization) I tend to removing it in 5.5, but am not sure if it might bring notable benefits with some database drivers ... Previous Comments: ------------------------------------------------------------------------ [2011-09-30 22:52:32] grinyad at mail dot ru Description: ------------ You cant use multiple PDORow's at the same time. Test script: --------------- <?php $row = $stmt->fetch(PDO::FETCH_LAZY); print_r($row); $row2 = $stmt->fetch(PDO::FETCH_LAZY); print_r($row); print_r($row2); ?> $row => PDORow Object ( [queryString] => select acl.* from accesscontrollevel as acl [Id] => 2 [Title] => Banned ) $row => PDORow Object ( [queryString] => select acl.* from accesscontrollevel as acl [Id] => 3 [Title] => Member ) $row2 => PDORow Object ( [queryString] => select acl.* from accesscontrollevel as acl [Id] => 3 [Title] => Member ) $row and $row2 are the same as last fetch result $row2.I mean that every PDORow Object will have the last fetch values. I think this is a bug. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55826&edit=1

« previous php.bugs (#164013) next »