[Tutor] Understanding cursors or MySQLdb problem

Rick Pasotto rick@niof.net
Tue Feb 11 15:28:03 2003


On Tue, Feb 11, 2003 at 01:08:50PM -0500, andy surany wrote:
> 
> This all has worked great! until I changed my query to look like:
> 
> query='select ax, bx, SUM(cx) from tablename'
> 
> Now, when I try data_element3.append(dbinfo.SUM(cx[i])) I get the
> following error:
> 
> SQL instance has no attribute 'SUM'

Have you tried naming your column?

query='select ax, bx, SUM(cx) as cxsum from tablename'

-- 
"Economics is extremely useful as a form of employment for economists."
		-- John Kenneth Galbraith
    Rick Pasotto    rick@niof.net    http://www.niof.net