Humm, I didn't saw that setMode coming... I can see that "orWhere" method should then only be used with combined conditions.
Michael, there you have, reactor is even better than I thought, João Fernandes -----Original Message----- From: [EMAIL PROTECTED] on behalf of Sean Corfield Sent: Tue 14-Feb-06 11:10 PM To: [email protected] Subject: Re: Reactor For CF Using WHERE and OR On 2/14/06, João Fernandes <[EMAIL PROTECTED]> wrote: > <cfset gtw = myreactor.creategateway("mytable")> > <cfset query = gtw.createquery()> > <cfset where1 = createOBject("component","reactor.query.where").init(query)> You don't need to create where objects like that! Reactor lets you combine where clauses: <cfset gtw = myreactor.creategateway("mytable")> <cfset query = gtw.createquery()> <cfset where = gtw.getwhere()> <!--- add first where clause: ---> <cfset where.isLike("mytable","field1",myvar)> <!--- default mode is 'and' - change it to 'or' ---> <cfset where.setMode("or")> <!--- add second where clause: ---> <cfset where.isLike("mytable","field2",myvar)> <!--- execute combined query: ---> <cfset gtw.getByQuery(query)> -- Sean A Corfield -- http://corfield.org/ Got frameworks? "If you're not annoying somebody, you're not really alive." -- Margaret Atwood -- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/ -- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/
<<winmail.dat>>

