RE: [PHP] limiting rows and pages like google

2001-09-16 Thread Lawrence . Sheed
; } -Original Message- From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] Sent: September 14, 2001 5:57 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; php general list Subject: RE: [PHP] limiting rows and pages like google Hi, Thanks. Instead of using next and previous I am giving the page number

RE: [PHP] limiting rows and pages like google

2001-09-14 Thread Adrian D'Costa
[mailto:[EMAIL PROTECTED]] Sent: September 14, 2001 1:34 AM To: php general list Subject: Re: [PHP] limiting rows and pages like google It's not too hard to do the next/previous through all your results, as has been shown by several people. What is a little trickier, at least when

Re: [PHP] limiting rows and pages like google -- again

2001-09-13 Thread Adrian D'Costa
On Thu, 13 Sep 2001, Helen wrote: The logic would be to check if the script is called the first time, then the sql statement would be select travel.*, city.city from travel, city where travel.cityid=city.id limit 0,20. The second time or based on what has been selected on the page (1-20,

Re: [PHP] limiting rows and pages like google -- again

2001-09-13 Thread Helen
Do you want to list all the pages of posts or just a link to the next 20 items? On the first page, 20 and links to the other items that when selected will display the list based on the selection. One thing to remember is that the ids will not be in squence. Here's a function I wrote to

Re: [PHP] limiting rows and pages like google

2001-09-13 Thread Julian Wood
It's not too hard to do the next/previous through all your results, as has been shown by several people. What is a little trickier, at least when using mysql and trying to take advantage of the limit clause, is how to display how many results you have (ie 1 to 10 of 107 results). If you use

RE: [PHP] limiting rows and pages like google

2001-09-13 Thread Lawrence . Sheed
NEXT link $newoffset=$offset+$limit; print a href=\$PHP_SELF?offset=$newoffset\NEXT/ap\n; } -Original Message- From: Julian Wood [mailto:[EMAIL PROTECTED]] Sent: September 14, 2001 1:34 AM To: php general list Subject: Re: [PHP] limiting rows and pages like google It's not too

[PHP] limiting rows and pages like google

2001-09-12 Thread Adrian D'Costa
Hi, I am trying to find out the the best way to do the following: I have a script that select records from a table. The problem is that I need to limit the rows to 20. I know that I can use limit 20. But what I want to do is give the view a link to the next 20 till all the records are shown.

[PHP] limiting rows and pages like google

2001-09-12 Thread Aniceto Lopez
paging results: this is tha idea page 1 - SELECT * FROM yourtable ORDER BY id DESC LIMIT 0, 20 page 2 - SELECT * FROM yourtable ORDER BY id DESC LIMIT 21, 20 page 3 - SELECT * FROM yourtable ORDER BY id DESC LIMIT 41, 20 ... so $next = 0 //starting SELECT * FROM yourtable ORDER BY id DESC LIMIT

[PHP] limiting rows and pages like google -- again

2001-09-12 Thread Adrian D'Costa
Hi, I am trying to find out the the best way to do the following: I have a script that select records from a table. The problem is that I need to limit the rows to 20. I know that I can use limit 20. But what I want to do is give the view a link to the next 20 till all the records are shown.

Re: [PHP] limiting rows and pages like google -- again

2001-09-12 Thread David Robley
On Thu, 13 Sep 2001 14:55, Adrian D'Costa wrote: Hi, I am trying to find out the the best way to do the following: I have a script that select records from a table. The problem is that I need to limit the rows to 20. I know that I can use limit 20. But what I want to do is give the view