[Re: [Zope-DB] Connecting to MySQL DB from infoForm / infoAction]
Paul Resnikoff
paulr@stanfordalumni.org
Fri, 03 Jan 2003 21:08:23 -0000
Thanks Martin. I got every step to work except "use it =
from within your action file" Can you suggest code to insert in the acti=
on
file to add info to the mysql table?
- Paul
Martin Gebert <Murphy@members.netsolution-net.de> wrote:
Paul Resnikoff schrieb:
>Hello, I would appreciate anyone who has the time to look at this issue!=
:
>
>I am building a news webpage using Zope v2.5.1. I would like to collect=
the
>emails of people interested in receiving email updates. I have a MySQL
>database set-up and connected properly. I have also set up working info=
Form
>and infoAction files to collect user emails. I would like to send the u=
ser
>email addresses to a table contained in the MySQL database so that I hav=
e
them
>all stored in an easy table format. =
>
Do I get it right, you're simply asking how to store some data in a =
database from within Zope?
Well, then you should read the Zope Book, chapter 12 (Relational DB =
Connectivity). A short outline: you set up the Database Adapter for your =
DBMS (MySQL), create the tables needed, create a Z SQL Method and use it =
from within your action file (preferably a Python Script, that's the =
easiest way).
Martin
____________________________________________________________________
=