[eluser]davidbehler[/eluser]
If you are using MySQL you can use LIMIT.
Code:
SELECT * FROM table LIMIT 0,1;
This would give you the first record.
Code:
SELECT * FROM table LIMIT 17,1;
This would give you the 18th record.
Code:
SELECT * FROM table LIMIT 5,5;
This would give you record 6,7,8,9 and 10.
You could create a function in your controller that has the number of the current record as the only parameter. Let's say you call your parameter $page and pass it to you model. Then you could do this:
Code:
$record = $page -1;
$query = "SELECT * FROM TABLE LIMIT $record, 1;";
I substract 1 from $page because usually you start counting at 1 for the first record but MySQL (as most programming languages) starts 0.
Hope that helps