On Wed, 2002-03-27 at 13:49, Bryan C. Andregg wrote: <..>
You could do something like this
<dtml-if "REQUEST.has_attr(cb)"> <dtml-call dbInsert(str1 = REQUEST[str1], str2 = REQUEST[str2], cb = REQUEST[cb] )"> <dtml-else> <dtml-call dbInsert(str1 = REQUEST[str1], str2 = REQUEST[str2], cb = '' )"> </dtml-if>
Actually, I discovered moments after posting my question that there's an 'optional' keyword, so my statement can now read: insert into mytable(col1,col2,col3) values (<dtml-sqlvar str1 type="string">, <dtml-sqlvar str2 type="string">, <dtml-sqlvar cb type="string" optional> ) and it will work (assuming the col3 column accepts nulls). -- Colin Fox cfox@crystalcherry.com CF Consulting Inc. GPG Fingerprint: D8F0 84E7 E7CC 5C6C 9982 F1A7 A3EB 6EA3 BC97 572F