I have the following SQL which I have been trying to turn into the
equivalent a Reactor Query:
SELECT points.*
FROM points AS points
LEFT JOIN userpt_connect AS userpt_connect
ON points.point_id = userpt_connect.userpt_connect_point
WHERE (points.point_description LIKE '%#searchVar#%' OR
points.point_name LIKE '%#searchVar#%')
AND (points.point_userid = #userID# OR
userpt_connect.userpt_connect_userid = #userID#)
I've tried the following for the getWhere() methods:
gQuery.getWhere().isLike("points","point_description","%#searchVar#
%").setMode("or").isLike("points","point_name","%#searchVar#
%").setMode("and").isEqual("points","point_userid",userID).setMode
("or").isEqual("userpt_connect","userpt_connect_userid",userID);
and even using getWhereCommands():
gQuery.getWhere().getWhereCommands("(point_description LIKE '%
#searchVar#%' OR point_name LIKE '%#searchVar#%') AND
(points.point_userid = #userID# OR
userpt_connect.userpt_connect_userid = #userID#)");
- which outputs no SQL in the generated query, so I must be using
that incorrectly.
What I can't seem to get is how to qualify the two separate "OR"
statements separately.
Any help would be appreciated.
Jon
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --