[Zope] Dynamic ZSQL method - almost there

Kashif Jabbar kjabbar at ssidecisions.com
Mon Feb 2 14:43:57 EST 2004


Dieter,

Thank you very much. You provided the exact information I needed.

Kashif


Dieter Maurer wrote:

>Kashif Jabbar wrote at 2004-1-29 22:28 -0600:
>  
>
>>...
>>for row in context.mysql(params={'name':{'op':'=','val':'John Doe'}}):
>>  print row
>>return printed
>>
>>When I run the script I get a message as follows:
>>
>><r instance at 015C5760>
>>    
>>
>
>This is as it should look like:
>
>  A Z SQL Method (performing a "select") returns a
>  sequence of "r instances".
>  Each such "r" ("row") instances represents one row
>  of the result.
>
>  An "r" instance has the fields of the result row as attributes.
>  E.g. when you use "select a, b, c ..." then
>  you can access the fields by "r.a", "r.b", "r.c", ...
>
>  You can also access the fields by subscription "r[0]", "r[1]", ...
>
>  
>

-- 
Kashif Jabbar
Project Manager

Strategic Systems International, Ltd.
1603 Orrington Ave, Suite 950
Evanston, IL 60201

847.424.2486  Direct
847.424.2480  Main
847.424.2481  Fax
<http://www.ssidecisions.com/>


******
This communication and any files transmitted with it may contain 
information that is confidential, privileged and exempt from 
disclosure under applicable law. It is intended solely for the use
of the individual or entity to which it is addressed. If you are
not the intended recipient, you are hereby notified that any use,
dissemination or copying of this communication is strictly 
prohibited.

If you have received this communication in error, please notify
the sender. Thank you for your co-operation.





More information about the Zope mailing list