Subject | Re: [firebird-support] Re: is it possible? |
---|---|
Author | Lester Caine |
Post date | 2005-02-11T14:06:23Z |
Gediminas wrote:
records and are only using 'natural' order.
displayed in changes, depending on ORDER BY and filters.
handle that, an number of the php applications display random page
lists, these just call single records and 'throws the dice again' if a
page has already been added to the list.
If you want to create a table with random order, you need a base table
with a fixed order column - 1 to 12, and a second column into which you
'throw the dice'. Then you can use that table with a join to the real
data. But with current setup, it needs to be a real table, rather than a
temporary one ;)
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
> suppose there is the initial set:This would probably happen anyway, if you have updated some of the
> 1 2 3 4 5 6 7 8 9 10 11 12
> first call:
> 1 10 4 9 8 11 2 6 12 5 7 3
> second call:
> 6 9 10 3 1 7 11 2 4 8 12 5
> and so on
records and are only using 'natural' order.
>>>using SP, UDF or other FB 1.5 features need to implement function,The elements are never reordered, only the order that the RESULTS are
>>>which randomly orders dataset (get from the select statement) using
>>>iterative algorithm (actually, every function call reorders element
>>>position in the set).
displayed in changes, depending on ORDER BY and filters.
>>>As I know, the FB doesn't have set or list containers as in the STL.If you want to DISPLAY things in a random order, then your client would
>>>Is it possible to use table as a temporary container, but if several
>>>concurent calls to such function would occur?
handle that, an number of the php applications display random page
lists, these just call single records and 'throws the dice again' if a
page has already been added to the list.
If you want to create a table with random order, you need a base table
with a fixed order column - 1 to 12, and a second column into which you
'throw the dice'. Then you can use that table with a join to the real
data. But with current setup, it needs to be a real table, rather than a
temporary one ;)
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services