Forum Moderators: coopster

Message Too Old, No Replies

search then display on multiple pages

search display result multiple pages

         

bono667

6:00 pm on Jul 29, 2003 (gmt 0)

10+ Year Member



right guys n gals heres one for you.

Ive done a mysql query that is then displayed as a long list.

eg

one
two
three
four

but say I want 3 n 4 to be displyed on anouther page with a link to it at the bottom.
has ne1 got a clue how to do this?

jamie

8:26 pm on Jul 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi bono,

do a search for 'php pagination' in google there are tons of tutorials about it.

i believe devshed [devshed.com] has a very good one.

basically it involves determining the total number of results (mysql_num_rows) returned by the query and dividing this by the number of results you want to display per page, in order to work out how many pages to display.

then querying again using LIMIT in the mysql query to return only a certain number of results and displaying links to the next pages

sorry for not explaining more fully here, but it is fairly complicated and probably best read in a tutorial.

maybe a real guru could explain it better here ;-) do have a read in the meantime of one of the tutorials so that you understand the gist of it.

good luck

bono667

2:19 pm on Jul 30, 2003 (gmt 0)

10+ Year Member



thanks mate,, will do

bono667

2:33 pm on Jul 30, 2003 (gmt 0)

10+ Year Member



thankyou verymuch,, you wer right about the tutorial at dev shed... lol like printing off a book