[snip]
I've just tried the sub-select approach. Works great on the first page -
shows names listed alphabetically sorted by country. However, once I click
on
'Next 20' both sorts go bye-bye (neither by name nor country).
[/snip]
I am late to the thread but I wanted to offer another suggestion.
Thanks Jay,
Well, I went back to work on it, and with the combined suggestions from the
list, it's working now. I just had to insert the sub-select on the called
page as well. That seemed to be the problem.
Thanks for your suggestion -- I used part of it.
Regards,
Andre
On Thursday 06 June
Try a sub-select:
SELECT * FROM (SELECT * FROM rap ORDER BY rcountry,rcity,rsname,rfname
DESC LIMIT 30 OFFSET 30) ORDER BY whatever;
miguel
On Wed, 5 Jun 2002, Andre Dubuc wrote:
Apache 1.3.23 + PHP 4.1.2 + PostgreSQL 7.2
I have a query that sorts by name, country, and city, then pages in
That's at least curious - limiting and offsetting will most certainly
affect the results which are then sorted... I don't think that's what he
was after. Just my 2c.
Bogdan
Miguel Cruz wrote:
Try a sub-select:
SELECT * FROM (SELECT * FROM rap ORDER BY rcountry,rcity,rsname,rfname
DESC
My understanding was that he wanted to see the same 30 rows, but sorted in
a different way.
For instance, he wanted to see entries 30-60 as sorted by age, but to have
those sorted by height when displayed.
miguel
On Thu, 6 Jun 2002, Bogdan Stancescu wrote:
That's at least curious - limiting
My understanding was that he wanted to see the same 30 rows, but
sorted in
a different way.
For instance, he wanted to see entries 30-60 as sorted by age, but to
have
those sorted by height when displayed.
miguel
Maybe you could have a hidden field that lists the 30 IDs that are
Thanks Miguel,
I haven't tried the sub-query approach yet, but that does seem to be the way
to do this. My fear is that it will trash the current paging (which took
forever to get working with the current setup). Actually, after trying my
original code again in another smaller select
: [PHP] Modifying the sort order of a query
Thanks Miguel,
I haven't tried the sub-query approach yet, but that does seem to be
the
way
to do this. My fear is that it will trash the current paging (which
took
forever to get working with the current setup). Actually, after trying
my
original
Thanks John,
That looks promising, but the question remains -- would it affect the current
paging? I really don't wnat to spend another day getting that going again! :
Further, the actual ID numbers that would populate 'display_ids' . . .
'would be generated from your result set' -- I'm not
Dubuc [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 10:19 PM
To: Miguel Cruz
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Modifying the sort order of a query
Thanks Miguel,
I haven't tried the sub-query approach yet, but that does seem to be
the
way
to do this. My fear
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 10:49 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Modifying the sort order of a query
Hi John,
Sorry about that. I should have explained what I meant. The basic
problem
that I'm trying (desparately) to skirt around
isn't this just a matter of doing
order by country, whatever
??
-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 1:02 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Modifying the sort order of a query
I still really don't
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 10:49 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Modifying the sort order of a query
Hi John,
Sorry about that. I should have explained what I meant. The basic
problem
that I'm trying (desparately
and everything you want...
any way just a thought
cheers
Peter
-Original Message-
From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 6 June 2002 1:27 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Modifying the sort order of a query
Hi John,
Oh, my apologies again. I haven't thought
Holmes...
-Original Message-
From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 10:49 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Modifying the sort order of a query
Hi John,
Sorry about that. I should have
15 matches
Mail list logo