Hi, I've a problem with belongs. I've a page with a list of checkbox
(dog, cat, mouse, ...). For example If I choose dog and cat I'd like
execute:

select * from table where field in ('dog', 'cat')

I've written this code:

animals = request.vars.animals
res = db(db.table.field.belongs(animals)).select(db.table.ALL)

This works very good!!!
But If I choose only dog (for example) the code don't work. If I print
sql query I get this

select * from table where field in (do)

There aren't characters " ' " and last letter " g ". I don't
understand. Can you help me?

Thank you very much

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to