Re: Reordering results for a report - Mailing list pgsql-general

From Nathaniel Price
Subject Re: Reordering results for a report
Date
Msg-id 3FDA3F09.4050205@tesseract.net
Whole thread Raw
In response to Re: Reordering results for a report  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
On 12/12/2003 1:16 PM, Bruno Wolff III wrote :

>On Fri, Dec 12, 2003 at 10:37:27 -0800,
>  Nathaniel Price <nprice@tesseract.net> wrote:
>
>
>>So is there a way to make a query where I can sort arbitrarily without
>>having to create additional data in the database?
>>
>>
>
>You have to save the state somewhere. If there is somewhere else other
>than the database you can do this (e.g. cookies, URLs, etc...) then
>you might be able to do it.
>
>
Drat. I was hoping that you could use some sort of subquery... ah well.

However, I was just looking at the documentation for CREATE TABLE and
noticed that you can create temporary tables which only last as long as
the "session". I think I'll probably use these to store the sorting
order by creating tables with a unique name (perhaps something generated
by PHP's uniqid()) and joining on that-- not exactly what I had in mind,
but at least that way I don't have to worry so much about garbage
collection. Although I'm not sure how they'd work with persistant
database connections in PHP...

--
___________________________
Nathaniel Price
http://www.tesserportal.net
Webmaster



pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Reordering results for a report
Next
From: Nathaniel Price
Date:
Subject: Re: Reordering results for a report