Python: Zope with MySQL (and insert_id)

Chris Gonnerman chris.gonnerman at
Thu Oct 11 14:56:40 CEST 2001

This question is really best sent to the Zope list (go to
for more info).

----- Original Message ----- 
From: "Nick Glencross" <nickg at>

> I've spent the last two days teaching myself Zope, but there's alot that 
> I need to relearn to be able to implement web pages that I'd ordinarily 
> write as Perl CGI scripts.
> I've written simple mock-ups of forms and the like which I'd need to be 
> able to do, but one of the remaining problems is to do with my MySQL 
> backend.
> I've compiled up the Python MySQL DA relatively easily, but really need 
> to get at the MySQL-specific 'insert_id' functionality on the Database 
> Connection from within Zope.I can see that the ZMySQLDA module exposes 
> the functionality (in MySQLmodule.c). Although this means that the 
> functionality is obviously there through Python, I've hit a brick wall 
> trying to reach it through Zope itself.
> I *think* that I need to write some Python which gets Zope's datbase 
> connection (obviously it can't just open a new connection), and then 
> gets insert_id from it.
> Can anyone confirm that I'm on the right track, or better still, if 
> anyone's managed it, please let me know,
> Thanks in advance,
> Nick Glencross

More information about the Python-list mailing list