From: | Nathaniel Price <nprice(at)tesseract(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Reordering results for a report |
Date: | 2003-12-12 22:19:53 |
Message-ID: | 3FDA3F09.4050205@tesseract.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-php |
On 12/12/2003 1:16 PM, Bruno Wolff III wrote :
>On Fri, Dec 12, 2003 at 10:37:27 -0800,
> Nathaniel Price <nprice(at)tesseract(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Nathaniel Price | 2003-12-12 22:40:34 | Re: Reordering results for a report |
Previous Message | Greg Spiegelberg | 2003-12-12 21:25:00 | Re: [PHP] Reordering results for a report |
From | Date | Subject | |
---|---|---|---|
Next Message | Nathaniel Price | 2003-12-12 22:40:34 | Re: Reordering results for a report |
Previous Message | Gerard Samuel | 2003-12-12 21:51:49 | Re: [PHP-DB] pg_result_error() |