If we use the suggestion niphlod

        count = db.pagos.count()
        totalPagos = 
SQLTABLE(db((db.pagos.created_on>inicio)&(db.pagos.created_on<fin)).\
                              select(count), headers={count:'Total Pagos'})

We get the following error

Error snapshot [image: help] 
<https://sys.luzo.mx/admin/default/ticket/movil/189.242.175.32.2014-03-11.17-43-07.e99ddddc-2259-4da6-83d9-dd7f95341afe#>
 

<type 'exceptions.AttributeError'>('Table' object has no attribute 'count') 
We are reviewing the documentation, however we did not find any example to 
clarify that we have to make it work, as in past versions

El viernes, 7 de marzo de 2014 14:00:40 UTC-6, drayco escribió:
>
> All code work with web2py 2.8.3 but when we upgrade to web2py 2.9.4, we 
> use extensive SQLTABLE and in this moment we have a lot of errors similar to
>
> File "/home/drayco/webapps/newconfig/web2py/gluon/sqlhtml.py", line 2929, in 
> __init__
>     columns = 
> ['.'.join(sqlrows.db._adapter.REGEX_TABLE_DOT_FIELD.match(c).groups()) for c 
> in sqlrows.colnames]
> AttributeError: 'NoneType' object has no attribute 'groups'
>
>
> This is our code
>
> totalPagos = 
> SQLTABLE(db((db.pagos.created_on>inicio)&(db.pagos.created_on<fin)).\
>                               select(db.pagos.id.count()), headers={'COUNT(
> pagos.id)':'Total Pagos'})
>
> What can we do?
>
> Can you help me please?
>

-- 
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.

Reply via email to