Hi guys.

Let's assume the following table

db.define_table('test', Field('letter', 'double'))

How can I compare two 'letter' entries if for example

A=1.23
B=4.56

To get the last entry (B) I'll use

last_entry = db().select(db.test.ALL).last()

*But how do I get the entry before the last, in this case letter A?* The 
actual comparing will be done within index.html to check if B is greater or 
equal to A for example

{{if B >= A:}}
<!-- some html code-->
{{else:}}
<!-- some html code-->
{{pass}}



-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to