im trying to implement a generic browse function for my web database.
the function works fine when displaying the first 20 rows (it displays 20 rows to one page) and provides the correct Next link with what looks like the correct GET URL parameters.
However when you select Next the following error appears:
Warning: mysql_data_seek(): Offset 20 is invalid for MySQL result index 7 (or the query data is unbuffered) in /home/wdnas/public_html/gdms/browse.php on line 18
Error 0 :
heres the code:
function browse($scriptName, $connection, $browseString, $rowOffset, $query, $pageHeader,
$header, $tablename, $tablefile, $tablecss)
if(!($result = @ mysql_query ($query, $connection)))
$rowsFound = @ mysql_num_rows($result);
if($rowsFound != 0)
$previousOffset = $rowOffset - ROWS;
$nextOffset = $rowOffset + ROWS;
the rest of the code is for outputing the html......
something which is confusing me is no matter how many rows i have to display the error always refers to result index 7.
if anyone can point in me in the right direction, id be very grateful, its really slowing me down.