Edit report at https://bugs.php.net/bug.php?id=55826&edit=1

 ID:                 55826
 Updated by:         ssuffic...@php.net
 Reported by:        grinyad at mail dot ru
 Summary:            Multiple PDORow's
-Status:             Analyzed
+Status:             Feedback
 Type:               Bug
 Package:            PDO related
 Operating System:   Windows XP
 PHP Version:        5.3.8
 Block user comment: N
 Private report:     N

 New Comment:

Please try using this snapshot:

  http://snaps.php.net/php5.4-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




Previous Comments:
------------------------------------------------------------------------
[2013-06-12 05:01:36] ssuffic...@php.net

The rows in your test script return distinct values for PDO_DBLIB in PHP5.4. 
Which specific PDO driver are you having problems with?

------------------------------------------------------------------------
[2011-12-24 06:16:13] ssufficool at gmail dot com

Another issue with "fixing" this is that many databases (SQLServer) do not 
support multiple active statements per a database handle/connection. It will 
throw an error stating there is another active resultset.

So, 2 statements requires 2 connections.

------------------------------------------------------------------------
[2011-09-30 23:07:50] johan...@php.net

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 ...

------------------------------------------------------------------------
[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

Reply via email to