From: php at adaniels dot nl
Operating system: Any
PHP version: 5.1.4
PHP Bug Type: Feature/Change Request
Bug description: Please add row tell and seek for mysqli
Description:
------------
The mysql API functions mysql_row_tell and mysql_row_seek are not ported
to the mysqli libary.
I believe this is a shame, because currently it isn't possible to create a
function which uses a mysql_result but does not influence the code outside
of the function.
I do not see the fact that, mysqli_row_seek would return a resource and
not an actual rownumber, as a problem.
P.S. If it is generaly agreed that this is a usefull feature, but there
are no volenteers to add the function, I volenteer myself.
Reproduce code:
---------------
I would like to do the following:
function get_all_rows(mysqli_result $result)
{
$ptr = $result->row_tell();
$rows = array();
while ($row = $result->fetch_row()) $rows[] = $row;
$result->row_seek($ptr);
return $rows;
}
--
Edit bug report at http://bugs.php.net/?id=38150&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=38150&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=38150&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=38150&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38150&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=38150&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38150&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38150&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38150&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38150&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38150&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=38150&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=38150&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38150&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38150&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38150&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38150&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38150&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38150&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38150&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38150&r=mysqlcfg