To order an iterator..

Iterator.getOrder().setAsc("table", "field")

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dave Phipps
> Sent: 09 August 2007 15:34
> To: [email protected]
> Subject: [Reactor for CF] hasOne relationship question
> 
> Hi,
> 
> I have 2 tables in the db: web_church_posts and xref_church_post_types
> 
> In my reactor.xml file I have setup this relationship:
> 
> <object name="web_church_posts">
>    <hasOne name="xref_church_post_types">
>     <relate from="Church_Post_Type_ID" to="Church_Post_Type_id"/>
>    </hasOne>
> </object>
> 
> <object name="xref_church_post_types">
>    <hasOne name="web_church_posts">
>     <relate from="Church_Post_Type_id" to="Church_Post_Type_ID"/>
>    </hasOne>
> </object>
> 
> I need to output in a table the following:
> 
> Church_Post_Desc (from xref_church_post_types)
> FirstName,Lastname etc (from web_church_posts)
> 
> I have initially set up an iterator:
> 
> <set name="chPostsRecord" 
> value="#chRecord.getweb_church_postsIterator()#" />
> 
> and then I am looping through this. This is producing the 
> results in an 
> unsorted order.
> 
> My question is: Is there a better way to do this using a 
> query instead 
> of an iterator, if not how do I sort the iterator loop to display the 
> Church_Post_Desc in the proper order?
> 
> Any help, would be greatly appreciated.
> 
> Cheers,
> 
> Dave
> -- 
> David Phipps, Director
> [EMAIL PROTECTED]
> 
> Chapel Studios / London
> T +44 (0)20 7100 6980 F +44 (0)20 7100 6981 M +44 (0)7765 240899
> New Broad Street House, 35 New Broad Street, London, EC2M 1NH, United 
> Kingdom
> 
> Visit our website: http://www.chapel-studios.co.uk
> ______________________________________________________________
> _______________
> 
> Chapel Studios is a limited company registered in England. The
> information in this email is confidential, intended solely for the
> addressee, and may be legally privileged. If you are not the addressee
> or authorized to receive this for the addressee, you must not 
> use, copy,
> disclose or take any action based upon this message or any information
> herein. If you have received this message in error, please advise
> the sender immediately by reply e-mail.
> 
> 
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
> -- -- -- -- -- -- --
> 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