[sqlalchemy] Re: Working with a ResultProxy object

2011-08-02 Thread RVince
Tamas, I'm more confused now -- would I do this in my controller or in the mako file? If, in my controller, dont I need to create an array for each field, that is: i = 0 for row in c.result c.current_disposition_code[i] = row['current_disposition_code'] c.num[i] = row['num'] i = i +

[sqlalchemy] Re: Working with a ResultProxy object

2011-08-02 Thread RVince
Michael, Right, thats a better idea -- I am working with snippets of other people's code here. However, I still have the original problem of going from a ResultProxy object to output in a mako file which is a chasm I cannnot seem to bridge! RVInce On Aug 2, 10:06 am, Michael Bayer

Re: [sqlalchemy] Re: Working with a ResultProxy object

2011-08-02 Thread Michael Bayer
On Aug 2, 2011, at 11:31 AM, RVince wrote: Michael, Right, thats a better idea -- I am working with snippets of other people's code here. However, I still have the original problem of going from a ResultProxy object to output in a mako file which is a chasm I cannnot seem to bridge!

[sqlalchemy] Re: Working with a ResultProxy object

2011-08-02 Thread RVince
Michael, But if I do the following, and do NOT close it (at least, I dont believe I am now): result = engine.execute(select current_disposition_code,count(*) as num from cms_input_file group by current_disposition_code;) c.curent_disposition_codes = [] c.num = []

Re: [sqlalchemy] Re: Working with a ResultProxy object

2011-08-02 Thread Michael Bayer
On Aug 2, 2011, at 12:09 PM, RVince wrote: Michael, But if I do the following, and do NOT close it (at least, I dont believe I am now): result = engine.execute(select current_disposition_code,count(*) as num from cms_input_file group by current_disposition_code;)

[sqlalchemy] Re: Working with a ResultProxy object

2011-08-02 Thread RVince
LOL,I'm going backwards here, and taking far too long to get something so very simple done (there's a genuine lack of documentation here I think -- the only way to manage to learn much of this is by trial and error). Rather than trying to do this with straight SQL statements I will go plan B here