ID: 38509 User updated by: roberto at spadim dot com dot br Reported By: roberto at spadim dot com dot br -Status: Feedback +Status: Open Bug Type: Feature/Change Request Operating System: ANY PHP Version: 5.2.0RC2 New Comment:
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 Previous Comments: ------------------------------------------------------------------------ [2006-08-21 08:27:02] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. ------------------------------------------------------------------------ [2006-08-19 03:42:34] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38509&edit=1