[Zope] sqltest vx. var

Philip Aylesworth zopelist@regalint.com
Tue, 9 Mar 1999 10:01:52 -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).


Phil A

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