I am having some hard time to create a script that will display the first 10 results of a query having a link to next 10, and so on. Just like search engines do to list the results.
@HaganeNoKokoroOct 18.2004 — #In MySQL (I really don't know much about other DBMS) this is accomplished using the LIMIT in the sql statement. For example, if your query isSELECT * FROM sometable WHERE somecolumn=somevalueThen you would change it toSELECT * FROM sometable WHERE somecolumn=somevalue LIMIT start, countSo say you use 10 for [font=courier]start[/font] and 5 for [font=courier]count[/font]. Then it would start at the 10th result and return the next 5. If you don't specify [font=courier]start[/font] then it will just start with the first result.
So what you do is pass the current start value through the URL and use it in your query. There are some (slightly) more complicated things you can do, of course, like if you count the total results that would be returned with no limit, you can calculate the total number of pages and create a link to each page. Or allow users to set how many results per page, etc.
Of course, you will have to execute the query every time, so when someone clicks the link to the next page, the query will run again, but with different limit values.
I also found a little reference on limiting results in other DBMS