[mod_python] MySQLdb

Petros Keshishian pkeshishian at yahoo.com
Tue Dec 30 10:20:40 EST 2003

I have put req.write() statements before and after the execute() function like this:
db = MySQldb.connect(db='aua', user='root')
c = db.cursor()
req.content_type = "text/plain"
req.write("Before Execute\n")
c.execute('select fname,lname,gyear from addrbk')
req.write("After Execute\n")
When I point the browser to this function I see:
Before Execute
And nothing else. No error messages even though I have PythonDebug On. As I already sent in my previous e-mail there is a segmentation fault reported in error log.
What's surprising is that it works fine if I query for any two columns instead of three.
Thanks for your help,

Eric Radman <theman at eradman.com> wrote:

Are you saying that it won't run ANYTHING after the execute() function?

Eric Radman
theman at eradman.com

On Tue, 2003-12-30 at 09:54, Petros Keshishian wrote:
> I would very much appreciate if anyone could resolve
> my problem with MySQLdb.
> I am try to run a query from mod_python as follows:
> db = MySQldb.connect(db='aua', user='root')
> c = db.cursor()
> c.execute('select fname,lname,gyear from addrbk')
> The program freezes at the last (3rd) line. The same
> code works fine if I run it from python shell
> directly. 
> The code even works in mod_python if I query for less
> than 3 column, e.g.
> c.execute('select fname,lname from addrbk')
> or
> c.execute('select lname, gyear from addrbk')
> Can anybody tell me what's going on?
> Thank you for your help,
> Petros
> __________________________________
> Do you Yahoo!?
> Find out what made the Top Yahoo! Searches of 2003
> http://search.yahoo.com/top2003
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.modpython.org/pipermail/mod_python/attachments/20031230/06304ebd/attachment-0003.htm

More information about the Mod_python mailing list