Re: [SQLObject] how to run a plain query?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ma...> - 2004-11-19 05:04:17
|
On Thu, Nov 18, 2004 at 04:28:00PM -0500, Martin d'Anjou wrote: > How do I run a plain query? > > conn = connectionForURI('mysql://user:passwd@server/db') > conn.query('select count(*) from mytable;') > > Where is the count value goint? How do I get it? count = conn.queryOne('select count(*) from mytable') or count, size = conn.queryOne('select count(*), sum(size) from mytable') Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |