[ic] Re: Sorting

Ubi interchange-users@interchange.redhat.com
Thu May 23 03:46:02 2002


If I were in you, I would use the [query] tag.

I have tried to do exactly what I want with IC tags many times, but
for instance it seems that selecting a field only and applying a distinct
does not help, even if you also choose to return one field only from the
query. The only safe way to DISTINCT seems to use a straightford DB query.

I do not know if [query] can be used like [loop] but I seem to remember
that this is the case. It's worth a try.

Ah! Please let me know if this works, I would like to know.


[query
        list=1
        st=db
        sql=|
                SELECT DISTINCT mark FROM products
                ORDER BY mark
        |
]
<option>[sql-param mark]</option>
[/query]



--------------

On Wed, 22 May 2002 patrice.fabre@armazemdedados.com wrote:

Hi,

I want only return value on my column in OPTION tag.
I wrote :

[loop search="tf=mark/to=n"]<option value="[loop-item mark]">[loop-item
mark]</option>[/loop]

But all the fields of this column are listed. So i don't want two times the
same field.

My page return :

Audi
Audi
Audi
Mercedes
Mercedes
BMW
BMW
BMW
BMW

But want i want it's only :
Audi
Mercedes
BMW


One time for each mark.



If you know something please help me, thanks
Best Reagrds,

Patrice CIPION-FABRE -- ADD

_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users