Michael, Look at the Where.cfc, there is 1 method called "orWhere" that accepts 2 "reactor.query.where" objects.
it should work something like this:
<cfset gtw = myreactor.creategateway("mytable")>
<cfset query = gtw.createquery()>
<cfset where1 = createOBject("component","reactor.query.where").init(query)>
<cfset where1.isLike("mytable","field1",myvar)>
<cfset where2 = createOBject("component","reactor.query.where").init(query)>
<cfset where2.isLike("mytable","field2",myvar)>
<cfset query.getwhere().orWhere(where1,where2)>
<cfset gtw.getByQuery(query)>
It should work (I can't test it because I don't have any server running here)
João Fernandes
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Michael Lantz
Sent: Tue 14-Feb-06 8:39 PM
To: [email protected]
Subject: Reactor For CF Using WHERE and OR
Hey everyone,
OK, I am looking at this getWhere structure, and I don't quite understand
something.
How would I write a query like this using Reactor:
SELECT * FROM myTable
WHERE Field1 LIKE '#myvar#' OR Field2 LIKE '#myvar#'
I know it has something to do with orWhere(), but I just don't see exactly
how it works.
Thanks!
Michael
-- 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>>

