I've been searching for some time now, and I can't find any answers to this problem. I have a script which is supposed to count the number of rows in a table, and make new pages depending on how many rows there are. It counts the number of rows using one query, then it pulls the data out using another. The query which pulls the data out is LIMITed according to variables. I'm pretty sure the code works up to this point, but then there is a while loop with three parameters. For some reason, when displaying results where $r=2
(thus $rmax=40, $rmin=20, $i=20 (initially), and $num=22)
it makes room for the last two rows of data (which do exist) but it doesnt print any information. Then it prints repeated errors, like so;
Warning: mysql_result(): Unable to jump to row 21 on MySQL result index 3 in
$rmax = $r*20;
echo $rmax;
$rmin = $rmax-20;
$i = $rmin;
$result = mysql_query("SELECT * FROM guide WHERE fid = '".$f."' ORDER BY modification DESC LIMIT $rmin, $rmax");
$resultx = mysql_query("SELECT * FROM guide WHERE fid = '".$f."'");
$num = mysql_num_rows($resultx);
while (($i < $num) && ($i < $rmax) && ($i >= $rmin)) {
$title=mysql_result($result,$i,"name");
echo $title;
++$i;
}
note: $f is defined from the url