
Or you can think of GR as codecall forum, #php forum
Each row is the title of the thread (or or title of the entry from your blod, in GR)
I can use LIMIT 0, 10 to fetch a limit quantity of data from the table (row, in this case, the title of the thread).
So when a user click on "Show more", or base on Google Reader style, the users scroll down, the javascript will then interacts the script to fetch more.
What I need help with is, how to fetch 10 rows everytime.
So let say here is my own code
<?php
require_once('front/config_custom.php');
$find = mysql_query("SELECT * FROM `notes` ORDER BY id DESC LIMIT 0, 10");
echo '<ul>';
while($row = mysql_fetch_array($find)){
echo '<li>' . $row['content'] .'</li>';
}
echo '</ul>';
?>
This is the first time , when a user enter my page, this is the script I wrote.
Now, I want the users to either click on SHOW ME MORE, or scroll down the bar, to fetch older threads from the same table.
So each time I want to fetch
1st 0 - 10
2nd 11 - 21
3rd 22 - 32
4th 33 - 43
5th 44 - 54
and so on
How do I do this?
I want the script to do this, fetch 10 after every click, and must be the 10 after the previous state.
Thanks.


Sign In
Create Account


Back to top









