> I have two queries running, one is an office listing and the > other is a ministry listing. > I have a drop down list that is populated dynamically with > the results. > <cfoutput query="qryallofficealias"> > <option value="office.#officeid#">#officealias#</option> > </cfoutput> > <cfoutput query="qryallministryalias"> > <option value="ministry.#ministryid#">#ministryalias#</option> > </cfoutput> > Iım asking for help in getting both offices and ministries > into one list of sort... No pun intended. > And doing one alpha sort, but still giving them different > values as listed here so they go to the correct destination.
You could UNION the 2 queries and loop through the one query - that way you can order it by whatever you want It presumes that they're both in the same datasource; Select 'office.'+Convert(varchar,OfficeID) as ID, OfficeAlias as AliasName >From Offices Union Select 'ministry.'+Convert(varchar,MinistryID) as ID, MinistryAlias as AliasName >From Ministries Order by AliasName I've written that for SQL Server, but you could do similar in other db's Philip Arnold Technical Director Certified ColdFusion Developer ASP Multimedia Limited Switchboard: +44 (0)20 8680 8099 Fax: +44 (0)20 8686 7911 www.aspmedia.co.uk www.aspevents.net An ISO9001 registered company. ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ********************************************************************** ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists