;
}
-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
[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
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,
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
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
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
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.
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
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.
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
10 matches
Mail list logo