--- Dan Diephouse <[EMAIL PROTECTED]> wrote:
> After the recent post about the search engine it got
> me thinking about
> searching my sql databases.  I would like to be able
> to search a
> database with boolean operators.  But with my
> limited database
> knowledget it would generate something like this:
> 
> select * from table where description LIKE "%text1%"
> and description
> LIKE "%text2%" OR....
> 
> This gets ugly and I don't think it is the right way
> to do this.  Also I
> don't think the Criteria class was designed with
> this in mind.  So what
> other options do I have to do boolean searching? 
Dan,
I don't see anything wrong with the above SQL.  For
inspiration on forming the above, you might want to
read Scott Ambler's
http://www.ambysoft.com/persistenceLayer.html

He suggests using nested Criteria classes for dealing
with "OR".

Regards, george

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to