I'm using a simple query to get aggregate: max = db.table.date.max() row = db().select(max)
Just following the example here http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#sum-avg-min-max-and-len But I ran into this error: Traceback (most recent call last): File "/Users/web2py/web2py/gluon/main.py", line 445, in wsgibase serve_controller(request, response, session) File "/Users/web2py/web2py/gluon/main.py", line 180, in serve_controller page = run_controller_in(request.controller, request.function, environment) File "/Users/web2py/web2py/gluon/compileapp.py", line 660, in run_controller_in vars = vars.xml() File "/Users/web2py/web2py/gluon/packages/dal/pydal/objects.py", line 2497, in xml rv = self.db.represent('rows_xml', self) File "/Users/web2py/web2py/gluon/packages/dal/pydal/base.py", line 834, in represent return self.representers[name](*args, **kwargs) File "/Users/web2py/web2py/gluon/sqlhtml.py", line 3319, in __init__ tablemap = dict(((f.tablename, f.table) for f in fieldmap.values())) File "/Users/web2py/web2py/gluon/sqlhtml.py", line 3319, in <genexpr> tablemap = dict(((f.tablename, f.table) for f in fieldmap.values())) AttributeError: 'Expression' object has no attribute 'tablename' Kindly assist. On Tuesday, July 11, 2017 at 5:40:08 AM UTC+8, Massimo Di Pierro wrote: > > It took a year. Thanks to everybody who contributed. There are a ton of > bug fixes and speed improvements. > > I would encourage everybody who contributed to add a comment in this > thread explaining the main features/improvements they have made. > > If anything does not work or was broken it is only fault and I will remedy > if reported. > > Massimo > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.