-Original Message-
From: William Martell [mailto:[EMAIL PROTECTED]]
I am trying to query MySQL using PHP and I would like the
results to display
on multiple pages.
I would like to display only 20 results per page and allow
the user access
to the other pages by clicking next or an index of numbers 1
2 3 4 5 6 and
so on dependent upon the number of results returned.
I do not know how to do this?? Can anyone point me in the right
direction???
First you would probably query for the number of records that would be returned. That
way you can create your navigation bar with the correct amount of increments ( 1 2
3 4 5 6 ). Each increment = 20 records.
Then you can perform queries using LIMIT ( LIMIT 0,19 ... LIMIT 20,39 ... LIMIT 40,59
etc ).
Also, When a user does perform this query, will all of the
pages be created
at that time. Or will the page be created with another
request and response
from the server.
One page at a time using LIMIT.
You could create all the pages at once, but where are you going to put them, how are
you going to serve them... I think you should just query each page of data when the
user wants it.
In other words. Does the result of the query get stored in a
variable that
is accessed on the client machine or does the php code return
the limit per
Hey look, you almost got a solution yourself...
Luc
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php