[Zope] INSERT/UPDATE in SQL methods
Joachim Schmitz
perry@ac-copy.net
Wed, 18 Aug 1999 11:56:57 +0200 (CEST)
thanks, that was the tip I'm missing, after some other changes my
universal ZSQL-method looks like this:
<!--#in EinAusgabe -->
<!--#unless sequence-start -->,<!--#/unless -->
<!--#var name -->
<!--#/in -->)
values (
<!--#in EinAusgabe -->
<!--#unless sequence-start -->,<!--#/unless -->
<!--#if "ftype == 'int'" -->
<!--#sqlvar "REQUEST[name]" type=int-->
<!--#/if -->
<!--#if "ftype == 'string' or ftype == 'date'" -->
<!--#sqlvar "REQUEST[name]" type=string-->
<!--#/if -->
<!--#if "ftype == 'float'" -->
<!--#sqlvar "REQUEST[name]" type=float-->
<!--#/if -->
<!--#/in -->)
with "table" and "REQUEST" in the argument list,
and the TinyTable EinAusgabe like this
Columns:
name label ftype length:int default auto
Data:
"event_id", "Event-Nr", "int", 10, "", "max"
"art", "Event-Art", "string", 20, "kino", NULL
"veran_id", "Veranstalter-ID", "string", 8, NULL, NULL
"veran_ort", "Ort", "string", 40, NULL, NULL
"veran_title", "Titel", "string", 80, NULL, NULL
"veran_link", "Link", "string", 40, "http://", NULL
"datum_von", "von", "date", 10, NULL, NULL
"datum_bis", "bis", "date", 10, NULL, NULL
"zeiten", "Zeiten", "string", 60, NULL, NULL
Gruß
Joachim Schmitz
WWW-Consultant
email: js@ac-copy.net
tel: +49-241-89491-0
fax: +49-241-89491-29