At 05:18 PM 4/24/00 -0700, you wrote:
>Million dollar question. Is there a way that if someone picks only their
>state, automatically the data is posted to only programsearch.cfm but if
>they select both their state AND a country then their data is posted to
>intlsearch.cfm
>
>Perhaps both queries can be contained in one script, but the one utilized
>is defined by a CFIF statement, which differentiates between whether their
>is only a STATE selected or if their is BOTH a STATE and a COUNTRY
>selected. Appreciate any illuminating insights on this front.

The second one sounds like an easier solution. Would something like this 
get all the info you need?

<CFQUERY NAME="programsearch" DATASOURCE="phonedata">
SELECT interstate.company_inter AS vendor, interstate.interrate AS
inter, intrastate.state AS state, intrastate.intrarate AS intra,
interstate.detailpage AS detailpage, interstate.term AS term,
interstate.billing AS billing
FROM interstate, intrastate
WHERE interstate.company_inter = intrastate.company_intra AND
(intrastate.state = '#state#')

<cfif IsDefined('country')>
AND (international.country = '#form_country#')
</cfif>


ORDER BY interstate.interrate, intrastate.intrarate
</CFQUERY>


------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to