[Zope] external and sql methods

Tony McDonald tony.mcdonald@ncl.ac.uk
Wed, 4 Aug 1999 10:58:21 +0100


At 11:38 am -0700 4/8/99, ainis wrote:
>Is there any way to call sql method from external method?
>

Yes.

def dopey_example(self):
	for the_item in self.your_ZSQL_method(param1=your_val, 
param2=your_val2):
		do_interesting_things_with(the_item)

'self' is your link to the Zope system (ie if you have a property 
called 'quote', then self.quote will obtain that for you).

tone
------
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2