[Zope] sqltest vx. var

Philip Aylesworth zopelist@regalint.com
Tue, 9 Mar 1999 11:06:27 -0500


>>Something I'm just curious about...
>>
>>where <!--#sqltest name column=column_name type=column_type-->
>>
>>VS.
>>
>>where column_name = <!--#var name-->
>>
>>Is the only advantage of using the first (sqltest) the type checking? I
>>can't find any other obvious advantages.
>>
>
>I haven't played with it too much but I think that Zope handles undefined
>variables properly if you do the sqltest.
>
>ie.
>
>where <!--#sqltest name column=column_name type=column_type-->
>and <!--#sqltest name2 column=column_name2 type=column_type-->
>
>will work if name2 is not defined.
>
>It also handles the quoting and SQL syntax (such as doubling single quotes).
>

I'll correct myself here. I was thinking of the <!--#sqlgroup ...--> tag. I
don't know what <!--#sqltest ...--> does that <!--#sqlvar name--> or
<!--#var name fmt=sql--> won't do...



Phil A

------------------------------------------
Philip Aylesworth    zopelist@regalint.com
Regal International