> Antony: Your solution sounds well, but, How I can build the query 
> dinamically as you propose? Can you write an example?
>

I don't think you want to simply take the 11 consecutive integers preceding 
the max id, as there may be gaps due to deletions. Anyway, if you did have 
a list of ids, rather than building up a long "or" query, you would instead 
use the .belongs method:

db(db.articulos.id.belongs(list_of_ids)).select()

Anthony

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