+-------[ Andrew Milton ]---------------------- | | ----- Original Message ----- | | From: Fran?oise CONIL | | To: zope@zope.org | | Sent: Thursday, December 11, 2008 11:21 AM | | Subject: [Zope] Problem using dtml-in in ZSQL method | | | | | | Hello, | | | | My ZSQL method receive a *mylist* parameter that should be an integer list : | | [21,35] | | | | The following code does not work : | | | | SELECT * | | FROM MyTable | | WHERE | | id in | | (<dtml-in mylist> | | <dtml-sqlvar sequence-item type=int> <dtml-if | | sequence-last><dtml-else>,</dtml-if> | | </dtml-in>) | | select * from mytable | <dtml-sqlgroup where> | <dtml-sqltest mylist multiple type=int> | </dtml-sqlgroup>
Actually the sqlgroup is superfluous in this case; name your "mylist" parameter as "id" and select * from mytable <sqltest id multiple type=int> or if you don't want to rename your parameter select * from mytable <sqltest mylist multiple type=int column=id> should work fine -- Andrew Milton a...@theinternet.com.au _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )