[Zope-DB] Help !! Using ZMysqlDA from a Zope Product

Alex Cowan alex@funcom.com
Mon, 9 Jun 2003 15:40:11 +0200


Hmm I'm not sure exactly what you're asking.

Pulling data from a MySQL database with zope is relatively easy, you just
need a ZMysqlDB connection, a Z SQL Method and a DTML Document.

Once you have those you write the query you want in the Z SQL Method and in
the DTML Document is something like

<dtml-in ZSQLMethodname>
<dtml-var column1>
<dtml-var column2>
<dtml-var column3>
</dtml-in>

You can put html etc around the dtml tags to format the output as you want.
If you could write a bit more about exactly what you want (what you are
trying to do, what you are using) I may be able to help more.

Alex

----- Original Message ----- 
From: <Simon.Price@trendcomms.com>
To: <zope-db@zope.org>
Sent: Monday, June 09, 2003 3:24 PM
Subject: [Zope-DB] Help !! Using ZMysqlDA from a Zope Product


> Hi all,
>
> I am relatively new to Zope, so if this is a basic question please forgive
> me.
>
> I am writing an app as a Zope product and would like to use mysql as the
> backend database.
> I can pull the data out of mysql using standard Mysqldb python calls,
> however manipulating the results in DTML is proving to be a nightmare.
> So I would like to be able to make calls using the
> "manage_addZMySQLConnection".
>
> Has anybody used this method from within a product and if so, would they
> mind providing me with an example of how to connect, and make a query.
>
> Many thanks
>
> simon
>
>
> __________________________________________________________________________
>
> Trend Communications Ltd.
> Knaves Beech Estate, Loudwater, Bucks, HP10 9QZ, United Kingdom.
> Tel: +44 1628 524977.
> Fax: +44 1628 810094 (not for confidential documents).
>
> Web: http://www.trendcomms.com
>
> No liability is accepted by Trend Communications Ltd for any loss or
damage
> incurred through use of this email.
>
>
>
> ________________________________________________________________________
> This email has been scanned for all viruses by the MessageLabs SkyScan
> service on behalf of Trend Communications Ltd.
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://mail.zope.org/mailman/listinfo/zope-db
>