[Zope-DB] Connecting to MySQL DB from infoForm / infoAction
Martin Gebert
Murphy@members.netsolution-net.de
Fri, 03 Jan 2003 21:16:51 +0100
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 infoForm
>and infoAction files to collect user emails. I would like to send the user
>email addresses to a table contained in the MySQL database so that I have 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