Re: [PHP] Modifying the sort order of a query

2002-06-06 Thread Andre Dubuc
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 2

RE: [PHP] Modifying the sort order of a query

2002-06-06 Thread Jay Blanchard
[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. Re

Re: [PHP] Modifying the sort order of a query

2002-06-05 Thread Andre Dubuc
o:[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 this through enough. I'm sorry > that > I've wasted your tim

RE: [PHP] Modifying the sort order of a query

2002-06-05 Thread Peter
by any 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'

Re: [PHP] Modifying the sort order of a query

2002-06-05 Thread Andre Dubuc
> > Example page will really help here; maybe I'm just slow in visualizing > this. We can take this off the list if necessary, too. > > ---John Holmes... > > > -----Original Message----- > > From: Andre Dubuc [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday,

RE: [PHP] Modifying the sort order of a query

2002-06-05 Thread Martin Towell
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

RE: [PHP] Modifying the sort order of a query

2002-06-05 Thread John Holmes
age- > 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 explained what I mean

Re: [PHP] Modifying the sort order of a query

2002-06-05 Thread Andre Dubuc
aintain the same 30 results in the new result set, like my previous > email mentioned... > > ---John Holmes... > > > -Original Message- > > From: Andre Dubuc [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, June 05, 2002 10:19 PM > > To: Miguel Cruz > > Cc

Re: [PHP] Modifying the sort order of a query

2002-06-05 Thread Andre Dubuc
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

RE: [PHP] Modifying the sort order of a query

2002-06-05 Thread John Holmes
guel 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 is that it will trash the current paging (which took > foreve

Re: [PHP] Modifying the sort order of a query

2002-06-05 Thread Andre Dubuc
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 function,

RE: [PHP] Modifying the sort order of a query

2002-06-05 Thread John Holmes
> 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

Re: [PHP] Modifying the sort order of a query

2002-06-05 Thread Miguel Cruz
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

Re: [PHP] Modifying the sort order of a query

2002-06-05 Thread Bogdan Stancescu
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 L

Re: [PHP] Modifying the sort order of a query

2002-06-05 Thread Miguel Cruz
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