What I want to do:
I have a Field("aa", "list:string") and I know that the internal
representation is e.g. "|x|y|z|u|v|".
Now I want to find all rows with
aa[0]=='x' and aa[1]=='y' and aa[2]=='z' and aa[3]=='u'
(that is a simplified example).
I have tried
db.mytable.aa.type = 'text'
res = db(db.mytable.aa.like('|x|y|z|u|%').select()
Some more details:
My program should find all records with '|x|y|z|u|'. If there are no
records the second try should look for '|x|y|z|'. Without any result the
next step should be to look for '|x|y|' and so on.
It works as expected.
My question: is this solution efficient?
Is there any better solution?
Regards, Martin
--
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.