[Zope] Little problem with DTML

Arpad Kiss Arpad Kiss" <sekter@mail.matav.hu
Fri, 5 Feb 1999 10:39:38 +0100


Hi,
It is not clear for me why you don't use the ORDER BY clause in your SQL
statement.
Of course in this case you have to store month number instead of month name
in your Gadfly database(to provide the right order).
Cheers,
Arpad

-----Original Message-----
From: FR Chalaoux <chalaouxf@synbio.tpgnet.net>
To: zope@zope.com <zope@zope.com>
Date: Thursday, February 04, 1999 8:49 PM
Subject: [Zope] Little problem with DTML


>Hi All,
>
>I spend a long day trying to play with DTML and SQL method.
>Thus, I decided to ask to experts :)
>My problem is to print the result of a an SQL method "call" only if a
>condition is realized.
>
>I readed many thing on documentation but even sqltest, sqlgroup,
>insert DTML in sql method, gave me not a solution. I admit also
>that these new notions are a bit new for me but more exemple
>should also help me.
>
>I have a properties(monthvalue : January, February, ....) that I want
>to test against a value of a column  of the resulting sql method
>(view_star_mois). If the record contents a column with the
>sequence-item then I print the record. This is the only solution I
>found to order by month my records in a gadfly database :)
>
>==========================
>Document template
>==========================
>
><!--#in monthvalue-->
>  <!--#in view_star_month-->
>    <!--#if "month == _vars['sequence-item']"-->
>      <!--#var starname--> <!--#var month--> <!--#var year--> <!--#var
>position-->
>    <!--#/if-->
>  <!--#/in-->
><!--#/in-->
>
>
>===========================
>SQL method : view_star_month
>===========================
>select * from star
>
>
>Question 1
>==========
>This algorithm is not very efficient cause I have to call an sql
>method for each sequence-item. Is there
>an other solution?
>
>Question 2
>==========
>The previous DTML sequence creates an empty html file. Why,
>cause my records database contents these months?
>
>Question 3
>==========
>Internationalization is not yet there for the date in Zope. Do you
>think with Python 1.2 this should come?
>
>
>Help please, FR.
>
>
>François-Régis Chalaoux
>Bioinformatics Group
>Synthélabo Biomoléculaire
>67080 Strasbourg Cedex
>FRANCE
>Tél : 03 88 60 87 14
>Fax : 03 88 45 90 70
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://www.zope.org/mailman/listinfo/zope
>
>