[Zope] How to call a python script within a Z-SQL method?

Julian Clark Julian.Clarke at b-online.com.au
Wed Nov 26 04:07:31 EST 2003


Hello list.

I'm trying to pass a result (or column of results) to a python script,
within an SQL query.


SELECT
dealer_no,
COUNT(mobile_no) as connects,
entry_date
FROM
connects
WHERE
entry_date >= #2003/11/20#
GROUP BY
dealer_no,
entry_date


where I'm wanting entry_date to be passed to a python script (and have the
result returned as part of the sql query)

How Can I do something like this?
*****************************
SELECT
dealer_no,
COUNT(mobile_no) as connects,
<dtml-call to_month(entry_date)>
FROM
connects
WHERE
entry_date >= #2003/11/20#
GROUP BY
dealer_no,
entry_date
*****************************

###to_month
return input.mm()


Thanks Muchly

Regards,

Julian Clark




More information about the Zope mailing list