To limit the return you would use LIMIT is the SELECT statement
Code:
$query= "SELECT coderid,codername,codercountry from coders order by coderid asc LIMIT 20"
This would return the last 20 in an ascending order. To get the last 20 in descending order change
asc LIMIT 20 to
desc LIMIT 20.
To get a specific range you would use
asc LIMIT 1,20 which would give rows 1-20, or
asc LIMIT 20,40 would give rows 20-40. Play around until you get what you want by changing asc and desc and the LIMIT parameters.
I don't have a pagination script in working order at the moment, it is something I need to get working on one of my dbs that has around 2200 rows. I have a script but not integrated into the rest of the script.
In the SELECT statement you specify all the fields you want called, whether they have data in them or not. Any that are empty will just have an empty cell in the row.
Try this as your select statement from your example where the table fields are id, player, game:
($query= "select id, player, game from
tablename order by id asc");
Change tablename to whatever it is in the db.
Bob