I've just started using Zope 3 and am having some
difficulty finding examples on a good way to access a
MySQL database. For the moment, I'd just like to be
able to read from the database and display it in a web
page with decent formatting.
I've read examples from Zope 2 where they used a DTML
page that called a ZSQL method such as the following:
ZSQL method would then contain:
SELECT river_id, river_name FROM river_info
In Zope 3, I only see an option to add a SQL script
which I'm pretty sure is not the same thing as a ZSQL
method since I've copied the above into a SQL script
and "Test"ing the script by itself does in fact read
from the MySQL database, but I can not access the SQL
script from a DTML page. I get the following error:
A server error occurred."
So, some very basic questions :
What is the suggested way to access a MySQL database
from Zope 3.
Should I even be creating DTML scripts, my
understanding was that there are better ways of doing
things than with DTML in Zope 3. Basically, I just
want to be able to customize the displaying of whats
in the database.
On this list, there was a posting of someone creating
a content type to access the database. Maybe this is
what I need to be doing. Seems like a lot of
overhead, as compared to Zope 2.
Here is a link to that thread:
Basically, I'm looking for guidance/suggestions on the
right way to go about doing this. Any help would be
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
Zope3-users mailing list