[Zope] Providing Arguments to ZSQL Methods that Insert and Update
in Python
Muk Yan
myan at umich.edu
Sun Aug 6 14:45:53 EDT 2006
Dear Zenith of Zope Knowledge,
Thanks for all the help from before it is truly appreciated.
I know that it's possible to provide arguments when selecing in a ZSQL
Method, but is it possible to provide arguments to UPDATE and INSERT.
I'll use an example that I found from a previous entry in the Zope mailing
list.
The ZSQL method looks like this:
Arguments: emp_id
first
last
salary
UPDATE person
SET person_first_name = first,
person_last_name = last,
person_salary = salary
WHERE person_emp_id = emp_id
and the call in the Script(Python) would be:
(context.aq_parent).updates.update_person(empid=someval1, first=someval2,
last=someval3, salary=someval4)
I'm having trouble correlating the Python variables with the ones in the
ZSQL method. I know how to pass variables from forms in DTML documents via
<dtml-sqlvar emp_id type=string>. Any help would be appreciated. Thanks in
advance and have a great weekend!
Take care,
Muk Yan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20060806/781b20e0/attachment.htm
More information about the Zope
mailing list