php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #38509 MYSQL: PDO FEATURES
Submitted: 2006-08-19 03:42 UTC Modified: 2020-08-28 12:47 UTC
Votes:4
Avg. Score:2.2 ± 0.8
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: roberto at spadim dot com dot br Assigned: cmb (profile)
Status: Closed Package: PDO MySQL
PHP Version: 5.2.0RC2 OS: ANY
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: roberto at spadim dot com dot br
New email:
PHP Version: OS:

 

 [2006-08-19 03:42 UTC] roberto at spadim dot com dot br
Description:
------------
could PDO have features like mysql_result ???
i use a lot it cause i have to read the last rown and after the first after the last-1 and after the second...

with PDO i can only make it if i read all data to an array and after read array :/

any feature in this area could help
thankx


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-21 16:44 UTC] roberto at spadim dot com dot br
Today i'm using mysql in this way:

$tmp_tbl=mysql_query($sql);
for ($i=0;$i<mysql_num_rows($tmp_tbl);$i++)
 echo mysql_result($tmp_tbl,$i,0);


in pdo sometimes i can't do it because i made an array lke this:

$tmp_tbl=mysql_query($sql);
$array=array(9,3,6,2,6);
for ($i=0;$i<count($array);$i++)
 echo mysql_result($tmp_tbl,$array[$i],0);

so i can't use pdo cause my rows are not sequencialy

if pdo could have a function like

$PDO_STATMENT = $dbh->prepare($SQL);
$PDO_STATMENT->execute();
$array=array(9,3,6,2,6);
for ($i=0;$i<count($array);$i++)
   echo $PDO_STATMENT->result($array[$i],0);  <-----

could help alot

today i'm creating a array putting all data to it and reading the array, but i need many memory and time...

could you undestood?
sorry the poor english
 [2006-08-22 02:51 UTC] roberto at spadim dot com dot br
setting current row could help like sqlite2 lib do
sqlite_seek

we will need buffered query!
 [2011-01-01 23:49 UTC] jani@php.net
-Package: Feature/Change Request +Package: PDO related
 [2013-06-12 04:47 UTC] ssufficool@php.net
-Summary: PDO FEATURES +Summary: MYSQL: PDO FEATURES
 [2014-01-02 13:39 UTC] felipe@php.net
-Package: PDO related +Package: PDO MySQL
 [2020-08-28 12:47 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2020-08-28 12:47 UTC] cmb@php.net
PDO supported scrollable cursors (and a respective $offset
parameter of PDOStatement::fetch()) even when you filed this
feature request.  However, MySQL doesn't support scrollable
cursors, so there's nothing we can do about that.  Consider to
file a feature request upstream.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 02:01:28 2024 UTC