pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathaniel Price <nprice@tesseract.net>
To: pgsql-general@postgresql.org
Subject: Re: Reordering results for a report
Date: Fri, 12 Dec 2003 14:19:53 -0800
Message-ID: <3FDA3F09.4050205@tesseract.net> (raw)
In-Reply-To: <20031212211644.GB6384@wolff.to>
References: <3FDA0AE7.60200@tesseract.net>
	<20031212211644.GB6384@wolff.to>

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





view thread (11+ messages)  latest in thread

Message-ID: <3FDA3F09.4050205@tesseract.net>
Permalink:  ../3FDA3F09.4050205@tesseract.net/
Also on:    postgresql.org/message-id/3FDA3F09.4050205@tesseract.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: nprice@tesseract.net, pgsql-general@postgresql.org
  Subject: Re: Reordering results for a report
  In-Reply-To: <3FDA3F09.4050205@tesseract.net>
  References: <3FDA0AE7.60200@tesseract.net> <20031212211644.GB6384@wolff.to> <3FDA3F09.4050205@tesseract.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox