On Mon, Oct 26, 2009 at 4:52 PM, george <[email protected]> wrote:

>
> Is there any way to do this, but have it match on OR instead of AND?
>
> User.findAll(Like(User.firstName, "%" + q + "%"), Like(User.lastName,
> "%" + q + "%"))
>
> I couldn't see a way to do it, so I tried out BySQL instead. However,
> when I put in the % wildcards I get a sql exception..
>
> User.findAll( BySql("users.email like '%?%'",
>      IHaveValidatedThisSQL("george", "2009-10-26"), q) )
>

I have not validated this, but try:

BySql("users.email like ?", ..., "%"+q+"%")



>
> So how do you specify the wildcards?
>
> thanks
>
> george
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to