Hi


I've got a model with a Contact object.  It has separate attributes for 
firstName and lastName.  In various parts of my app I'd like to be able to 
provide a search function where a user could type in part of a person's name 
that included the first name and part of the last and then display a list of 
those matching.



I know I can search on just the firstName using:



contacts = 
Contact.select(Contact.q.firstName.contains(searchText.encode('utf8')))



But, if someone types 'Jim Steil' in the search box, this filter would exclude 
the record for me because of the last name being there.  I'm wondering if there 
is some magic in SQLObject that will allow me to apply this search string 
against the combination of the firstName and lastName attributes of the Contact 
object.



Anyone?



                -Jim





------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to