[Zope] sorting a table
Gilles Lenfant
glenfant@bigfoot.com
Thu, 3 Jan 2002 13:20:23 +0100
MySQL, as most SQL engines has sort capabilities. I use this feature in ZSQL
method like this:
Parameters :
order mode
ZSQL script:
select field1, field2, field3 from mytable where (...) order by <dtml-var
order> <dtml-var mode>
Pass as strings to this ZSQL method :
order : either 'field1', 'field2', 'field3'
mode: 'ascending' or 'descending'
The syntax may depend on your db engine.
HTH
--Gilles
----- Original Message -----
From: "Lucas Vogel" <vogell@yahoo.com>
To: <zope@zope.org>
Sent: Thursday, January 03, 2002 12:08 AM
Subject: [Zope] sorting a table
> I have a DTML method that calls a Z SQL Method and places the results into
an
> HTML table. What I would like to do with the table is make the column
headers
> sort the results in ascending and descending order when they click on the
> link. I haven't really seen any Howtos or anything in the Zope book that
> describes or explains what I'm trying to do. If someone could help me with
> this I'd appreciate it.
>
> Thanks,
> Lucas Vogel
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>