[Tutor] Understanding cursors or MySQLdb problem

andy surany mongo57a@comcast.net
Tue Feb 11 15:39:29 2003


Thank you, thank you, thank you !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I've spent hours on this..............

Regards,

Andy
-----Original Message-----
From: Rick Pasotto <rick@niof.net>
To: tutor@python.org <tutor@python.org>
Date: Tuesday, February 11, 2003 3:28 PM
Subject: Re: [Tutor] Understanding cursors or MySQLdb problem


>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
>
>_______________________________________________
>Tutor maillist  -  Tutor@python.org
>http://mail.python.org/mailman/listinfo/tutor