the following lookup table stores prices based on a width and drop

db.define_table('rb_prices',
                Field('rb_width', type='integer'),
                Field('rb_drop', type='integer'),
                Field('rb_fabric_group', type='integer'),
                Field('rb_price', type='integer'))

when I submit the following query, it returns the correct result

((db.rb_prices.rb_width==2600)  &  (db.rb_prices.rb_drop==2600))

rb_prices.id 
<http://127.0.0.1:8000/wbd/appadmin/select/db?orderby=rb_prices.id>
rb_prices.rb_width 
<http://127.0.0.1:8000/wbd/appadmin/select/db?orderby=rb_prices.rb_width>
rb_prices.rb_drop 
<http://127.0.0.1:8000/wbd/appadmin/select/db?orderby=rb_prices.rb_drop>
rb_prices.rb_fabric_group 
<http://127.0.0.1:8000/wbd/appadmin/select/db?orderby=rb_prices.rb_fabric_group>
rb_prices.rb_price 
<http://127.0.0.1:8000/wbd/appadmin/select/db?orderby=rb_prices.rb_price>
7583 <http://127.0.0.1:8000/wbd/appadmin/update/db/rb_prices/7583> 2600 2600 
0 266
7898 <http://127.0.0.1:8000/wbd/appadmin/update/db/rb_prices/7898> 2600 2600 
3 471
8079 <http://127.0.0.1:8000/wbd/appadmin/update/db/rb_prices/8079> 2600 2600 
2 421

but when I change the "==" to ">=" in both clauses, I get a spurious result 
set where the server seems to only evaluate the first clause 
*db.rb_prices.rb_width==2600.*


*((db.rb_prices.rb_width>=2600)  &  (db.rb_prices.rb_drop>=2600))*

rb_prices.id 
<http://127.0.0.1:8000/wbd/appadmin/select/db?orderby=rb_prices.id>
rb_prices.rb_width 
<http://127.0.0.1:8000/wbd/appadmin/select/db?orderby=rb_prices.rb_width>
rb_prices.rb_drop 
<http://127.0.0.1:8000/wbd/appadmin/select/db?orderby=rb_prices.rb_drop>
rb_prices.rb_fabric_group 
<http://127.0.0.1:8000/wbd/appadmin/select/db?orderby=rb_prices.rb_fabric_group>
rb_prices.rb_price 
<http://127.0.0.1:8000/wbd/appadmin/select/db?orderby=rb_prices.rb_price>
7573 <http://127.0.0.1:8000/wbd/appadmin/update/db/rb_prices/7573> 2600 600 
0 195
7574 <http://127.0.0.1:8000/wbd/appadmin/update/db/rb_prices/7574> 2600 800 
0 203
7583 <http://127.0.0.1:8000/wbd/appadmin/update/db/rb_prices/7583> 2600 2600 
0 266

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