|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-05-10 11:34 UTC] olafvdspek at gmail dot com
[2005-05-10 14:35 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 05:00:01 2025 UTC |
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