[web2py] Improve this code about ( sql query, dict creation for json service)

2013-02-16 Thread Derek
Looks good. Might want to order by date and then select top 1. Found this in an old post by Massimo... (db .table.id>0).select(orderby=~db.table.recordtiime,limitby=(0,1)).first() -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubs

[web2py] Improve this code about ( sql query, dict creation for json service)

2013-02-15 Thread Christian Espinoza
Hi all!, could somebody get me a hand in order to improve this code, please? I'm getting a array of dicts here, every device have it last event attached in the dict... I'm want delete the iteration over the events table, I don't think it is efficient enough maybe it could be changed doing a bett