Req #63466 [Com]: PDO_MYSQL ignores PDO::FETCH_ORI_ABS in PDOStatement::fetch()

From: Date: Mon, 09 Jan 2023 12:06:39 +0000
Subject: Req #63466 [Com]: PDO_MYSQL ignores PDO::FETCH_ORI_ABS in PDOStatement::fetch()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243375@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63466&edit=1

 ID:                 63466
 Comment by:         sheyda dot babi5161 at gmail dot com
 Reported by:        vicrry at yahoo dot com dot hk
 Summary:            PDO_MYSQL ignores PDO::FETCH_ORI_ABS in
                     PDOStatement::fetch()
 Status:             Open
 Type:               Feature/Change Request
 Package:            PDO MySQL
 Operating System:   CentOS
 PHP Version:        5.4.8
 Block user comment: N
 Private report:     N

 New Comment:

I have the same problem and really know ***** I do not know what to do I can not find a solution
help me  (https://www.hyveehuddle.net/)github.com


Previous Comments:
------------------------------------------------------------------------
[2021-09-27 16:31:44] cmb@php.net

> Where in the PDO spec is written that every PDO driver has to
> support random flags of other drivers?

These flags are not driver specific, but rather general.  That
does not imply, that these flags need to be supported, though.

Anyhow, I'm not sure whether this can be implemented for
PDO_MySQL; the attached patch calls mysqlnd_stmt_seek() which
apparently was never implemented.

------------------------------------------------------------------------
[2020-08-09 12:10:21] cmb@php.net

Related To: Bug #79940

------------------------------------------------------------------------
[2013-01-30 16:08:28] uw@php.net

If its a bug, its a docs bug. Where in the PDO spec is written that every PDO driver has to support
random flags of other drivers? I do not remember anything like that. Nonetheless the docs create the
impression this is the case.

------------------------------------------------------------------------
[2012-11-08 09:48:34] vicrry at yahoo dot com dot hk

Description:
------------
When fetching with PDO::FETCH_ORI_ABS from MySQL with PDOStatement::fetch(), the 
driver silently swallows the options and work as if I passed PDO::FETCH_ORI_NEXT.

Test script:
---------------
$stmt = $pdo->prepare('SELECT * FROM table', array(
  PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL
));

$stmt->execute();

$row = $stmt->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_ABS, 5);

Expected result:
----------------
The sixth row returned.

Actual result:
--------------
The first row returned.


------------------------------------------------------------------------



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


Thread (4 messages)

« previous php.bugs (#243375) next »