Infinite scrolling

Hello

I am working on an infinite scrolling script. At the moment I am displaying a set of results with the limit set to 10.

When the user scrolls to the end of the page, it will execute another query. In this query how can I display the next ten results?

e.g

10 results
\/
scroll down
\/
next 10 results
\/
scroll down
\/
next 10 results

Check out the LIMIT clause: http://dev.mysql.com/doc/refman/5.5/en/select.html

Hello I understand using offsets using LIMIT 10, 10 however, how when the user scrolls down to the next set it would have to be 20,10 and then 30,10 etc
How would I automatically change that?

If you want to automatically load the next set when the user scrolls down, you’ll have to use javascript. And you’ll use javascript to send the offset to the PHP script.

There’s a good example of javascript being used to create infinite scrolling
over at nijol.x10.mx that may be of some use.