uhm, not quite. Leonel has the "mathematically right" solution...or you 
didn't explain your requirements well.

Given ids ranging from 1 to 31, i.e.

1,2,.....,30,31

your requirement, i.e. "I need to get the last 11 records from my database, 
but only the even" needs to fetch

11,13,15,17,19,21,23,25,27,29,31

Given instead ids

1,2,........24,26,28,30,31 (i.e. someone deleted 25,27,29 from the previous 
example)

you'd need to fetch

5,7,9,11,13,15,17,19,21,23,31

Leonel's query does exactly what you described...

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