[Zope] Z SQL and python script question

Kevin Carlson khcarlso@bellsouth.net
Tue, 29 Jul 2003 12:18:03 -0400


If I understand you correctly, you can do this by referencing the script 
within the ZSQL query within a <dtml-sqlvar...> tag.  For example, if 
the script is called "addStrings" and you're search a column named 
dbText, you could do this as follows (untested, but should work):

select * from DB where dbText=<dtml-sqlvar addStrings type="string">

Don't list "addStrings" as a parameter to the ZSQL query, but do make 
sure it is within the context of the caller of the ZSQL query.

Hope that helps.

Kevin

Rex McKanry wrote:

>Hi,
>I'm trying to join or add two text boxes from a Zope
>web page to use in a postgresql database search. I
>have written a python script that adds the two strings
>I'm passing for me and am passing the to strings to
>the sql query but am unsure how to call the python
>script from the sql statement. Does any one have any
>ideas??
>
>Thanks,
>Rex
>
>__________________________________
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free, easy-to-use web site design software
>http://sitebuilder.yahoo.com
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://mail.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists - 
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
>  
>