[Zope-DB] optional sql variables and commas

Michal Kurowski michal@genesilico.pl
Fri, 30 Aug 2002 23:14:46 +0200


Hi, 

I'm having problems with following sql statement on mysql with 
MySQLpy-0.9.1:

update Users set
Organization=<dtml-sqlvar organization type=string optional>
Country=<dtml-sqlvar country type=string optional>
City=<dtml-sqlvar city type=string optional>,
Address=<dtml-sqlvar address type=string optional>
where Username=<dtml-sqlvar username type=string>

I made any of those variables optional and that's why
I've got no idea where to place commas.

Depending on which of those variables is actually rendered I can get
many different sql statements most of which are erroneous.

I tried some tricks with <dtml-if> but no much success.

Is there any dtml function that would make it easier ? 

-- 
Michal Kurowski
<michal@genesilico.pl>