From:             olafvdspek at gmail dot com
Operating system: Windows 2003
PHP version:      5.0.4
PHP Bug Type:     MySQL related
Bug description:  Warning for seeking to row 0

Description:
------------
Hi,

PHP emits a bogus warning when you seek to row 0 in an empty result set.
Seeking to row 0 is a no-op in an empty set, but should not emit a
warning.

Reproduce code:
---------------
<?php
        mysql_connect('localhost', 'xbt', '');
        mysql_select_db('xbt');
        $rows = mysql_query("select 1 from xbt_files where 0 = 1") or
die(mysql_error());
        mysql_data_seek($rows, 0);
?>

Expected result:
----------------
No warning

Actual result:
--------------
Warning: mysql_data_seek() [function.mysql-data-seek]: Offset 0 is invalid
for MySQL result index 3 (or the query data is unbuffered) in
C:\IS\Apache2\htdocs\temp\data_seek.php on line 5

-- 
Edit bug report at http://bugs.php.net/?id=32997&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32997&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32997&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32997&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32997&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32997&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32997&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32997&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32997&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32997&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32997&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32997&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32997&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32997&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32997&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32997&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32997&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32997&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32997&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32997&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32997&r=mysqlcfg

Reply via email to