Re: Reordering results for a report
От | Nathaniel Price |
---|---|
Тема | Re: Reordering results for a report |
Дата | |
Msg-id | 3FDA3F09.4050205@tesseract.net обсуждение исходный текст |
Ответ на | Re: Reordering results for a report (Bruno Wolff III <bruno@wolff.to>) |
Список | 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 по дате отправления: