[Zope] Connection to MySQL in zope product

Andreas Jung lists at andreas-jung.com
Mon Mar 14 00:59:47 EST 2005



--On Sonntag, 13. März 2005 19:11 Uhr -0800 bahriesz at yahoo.com wrote:

> Hi,
>
> I plan to develop a product that make use of external
> database (MySQL). I tried to get some reference on
> this in internet, but to no avail. How can i do this?.
>
> I understand that with python script or dtml we need
> to create database connection object, and zsql method.
> But how do we do it from product class?.

For a CMF or Plone project you can put your ZSQL methods into a skins
folder (as files *.zsql). They are recognized automatically a ZSQL methods 
and be
be re-used through the standard acquistion magic as any other method.
Creating ZSQL methods as methods of a Zope product is somewhat un-common
but it can be done afaik by instantiating ZSQL methods (using their API 
which can
be found from the sources).

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20050314/be32d301/attachment.bin


More information about the Zope mailing list