[Zope-DB] Python Script / ZSQL

Infor Gates info_gates at yahoo.com
Tue May 10 21:24:36 EDT 2005

Hello Zopist

I am new and try to learn python script with ZSQL in
Zope. I have read the Zope Book. However, most of them
are in DTML and very few on python script. I have a
little knowledge on Zope and SQL but am lost in trying
to see the whole picture of zope/pythonscript/zsql.

I have a simple database record of person details.

I used a simple insertZSQL statement:
  p_givenname, p_familyname, 
  p_datebirth, p_sex )
 <dtml-sqlvar p_givenname   type="string">
 <dtml-sqlvar p_familyname  type="string">
 <dtml-sqlvar p_datebirth   type="string">
 <dtml-sqlvar p_sex         type="string">

In DTML script:
<dtml-call "REQUEST.set('p_givenname','Ian')">
<dtml-call "REQUEST.set('p_familyname','Gates')">
<dtml-call "REQUEST.set('p_datebirth','22-10-56')">
<dtml-call "REQUEST.set('p_sex','Male')">
<dtml-call insertZSQL>

How can I do something similar in python script? 

Can anyone point me to an example? Very much

Thank you.

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Zope-DB mailing list