Bug #79940 [Fbk->Opn]: Cannot re-fetch rows in PDO
| From: | guana dot histark at gmail dot com | Date: | Fri, 07 Aug 2020 05:42:10 +0000 |
| Subject: | Bug #79940 [Fbk->Opn]: Cannot re-fetch rows in PDO | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-228439@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79940&edit=1
ID: 79940
User updated by: guana dot histark at gmail dot com
Reported by: guana dot histark at gmail dot com
Summary: Cannot re-fetch rows in PDO
-Status: Feedback
+Status: Open
Type: Bug
Package: PDO MySQL
Operating System: Linux
PHP Version: 8.0.0beta1
Block user comment: N
Private report: N
New Comment:
<?php
$stmt = $conn->prepare("SELECT 1 FROM TABLE WHERE ID = 1");
$stmt->execute();
while($row = $stmt->fetch(PDO::FETCH_ASSOC)){
echo "First fetch \n";
}
while($row = $stmt->fetch(PDO::FETCH_ASSOC,PDO::FETCH_ORI_ABS,0)){
echo "Second fetch \n";
}
?>
Previous Comments:
------------------------------------------------------------------------
[2020-08-06 22:17:19] requinix@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2020-08-06 22:03:02] guana dot histark at gmail dot com
Description:
------------
PDO::FETCH_ORI_ABS is not working for mariadb
Test script:
---------------
while($row = $stmt->fetch(PDO::FETCH_ASSOC,PDO::FETCH_ORI_ABS,0))
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79940&edit=1