field in something is NOT supported (Man, you should check both the web2py 
book and general python syntax, or you'll loose a lot of time)

Your prototype in python pointed to have something ORed, i.e. if 
request.args(0) is None, then slip it in 'Both'.

What instead you're trying to achieve is querying for 'Both' AND 
request.args(0) at all times

you want a query like this in sql

select * from table 
where 
    something1 = 'whatisthereinrequest.args(1)'
    AND (
        something2 = 'whatisthereinrequest.args(2)' 
        OR
        something2 = 'Both'
)



This is achieved with 
((something1 == request.args(1)) & ((something2 == request.args(0)) | 
(something2 
== 'Both')))



If you want instead something like 
select * from table 
where 
    something1 = 'whatisthereinrequest.args(1)'
    AND something2 IN ('whatisthereinrequest.args(2)' , 'Both')



you should do 
((something == request.args(1)) & (something2.belongs((request.args(0),
'Both'))))




-- 



Reply via email to