Ok, modifying my code with LIMIT and SORT should do the trick, like:
$query = "SELECT * FROM fanfic_authors a, fanfic_contents c WHERE a.id = c.author AND a.id>$var ORDER BY ".$sort." LIMIT 50 ";
Now you have to pass your script the last pulled author id as $var, like:
while($row = mysql_fetch_array($result))
{
print($row[title] . "<br>");
$var=(int)$row[author];
}
If there are more than 50 records call your script like:
'<a href="yourscript.php?var='.$var.'>click here to get more</a>'
Needless to say in the first run, $var=0
|