Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Paging Records? 2

Status
Not open for further replies.

seagoing

Programmer
Jun 1, 2003
61
GB
Re: Win XP Pro IIS5.1 PHP5 MySQL5.

New to PHP/MySQL. Normally develop in ASP, MS Access/SQL
Something I frequently find myself doing in ASP is displaying paged data, from a database, on a webpage, by using the ADO Recordset object. I've not seen an obvious way to do this in PHP with data from a MySQL database, there doesn't seem to be any similar Recordset type object here.

Can anyone point me to a good tutorial on the subject, or perhaps giv an insight into how such functionality is handle on a web page using PHP with data from MySQL?

Regards
TS
 
Do you mean displaying a set of records a page at a time? You can get a subset of the result set using the LIMIT clause:
[tt]
SELECT * FROM tbl
ORDER BY id
LIMIT 100,50
[/tt]
This example will skip the first 100 records and return the next 50.
 
OK Tony, thanks for that, looks like a promising start.
Regards
TS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top