On Tue, Aug 2, 2011 at 3:07 PM, RVince <rvinc...@gmail.com> wrote: > In my controller class, I perform a rather basic, straightforward SQL > query: > > connection = engine.connect() > trans = connection.begin() > try: > c.result = connection.execute("select > current_disposition_code,count(*) as num from cms_input_file group by > current_disposition_code;") > connection.close() > > thus my c.result is an sqlalchemy.engine.base.ResultProxy object. > > When I go to render this in a mako file as: > > % for result in c.results: > ${result.current_disposition_code}[${result.num}] > % endfor > > I get no output. I am quite certain this is becuase I am using a > ResultProxy object. How can I output such an object inthe mako files, > or alternatively, how might i convert a ResultProxy objectsuch that I > can output it in a mako file? Thanks! RVince
Seems you missed fetching some rows from ResultProxy. http://www.sqlalchemy.org/docs/core/connections.html#sqlalchemy.engine.base.ResultProxy Hope this helps. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.