Thanks Dave!

 

I got it working..I didn't understand the xml config part.but now its all
working.my problem was it was easier than I thought :-)

 

Thanks!

 

- Derek

 

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Shuck
Sent: Sunday, November 26, 2006 10:07 PM
To: [email protected]
Subject: Re: [Reactor for CF] not sure how to accomplish this in reactor

 

>From the query I would guess that Pages and PageContent have a hasOne
relationship between them.  If that is the case, and assuming that you build
a Pages hasOne PageContent relationship in your config, this is
first-swag-untested-code without referencing any code or docs (read:
double-check my syntax!).  It is a rough draft, but it should be close
enough to get you started: 

<cfscript>
PagesGateway = application.ReactorFactory.createGateway("Pages");
PagesQuery = PagesGateway.createQuery();
PagesQuery.join("Pages","PageContent","Pages"); 
Pages.Query.getWhere().isEqual("Pages","page_status",1);
Pages.Query.getWhere().isEqual("PageContent","pagecontent_status",1);
qGetPages = PagesGateway.getByQuery(PagesQuery); 
</cfscript>

On 11/25/06, Derek P. <[EMAIL PROTECTED]> wrote:

Hey everyone, 

 

 

 

I have a query I wrote that, and I am having a hard time trying to figure
out how to write this in reactor code.heres the query:

 

SELECT p.page_id, c.pagecontent_id, p.page_name, c.pagecontent_name FROM
pages p JOIN pagecontent c USING (page_id)

WHERE p.page_status = 1 AND c.pagecontent_status = 1

 

 

I am not sure the best way to approach the code involved in this (in a
newbie :-) ), and was hoping that some gracious person might help translate
this to reactor code and give some sort of explanation?

 

 

To  give you some background, pages is basically the top-level category of a
navigation and pagecontent is the sub-menus of the top-level category.I am
not sure if that's a many to one relationship or what not.any help would be
greatly appreciated !! :-) 

 

 

- Derek


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
<http://www.mail-archive.com/reactor%40doughughes.net/> 
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- 




-- 
~Dave Shuck
[EMAIL PROTECTED]
www.daveshuck.com

Where's your Spot? 
www.instantspot.com 
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
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/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to