Hi, I am working on a telecom solution web site that allows you to find the 
best rates quickly.

You can see the sample at: www.telecomsavings.com/demo3/home.html

On the home page you can:

1. Do a search for only domestic rates by selecting ONLY your state i.e. 
CA, which posts your form query to an action script titled 
programsearch.cfm which is as follows:

<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#')
ORDER BY  interstate.interrate, intrastate.intrarate
</CFQUERY>

or

2. On the same home page a visitor can do a search for BOTH their state and 
a country the call on which they need a price. Your selections then post 
your form query data to a script called intlsearch.cfm which is as follows:

<CFQUERY NAME="intlsearch" DATASOURCE="phonedata">
SELECT      interstate.company_inter, interstate.interrate, 
interstate.detailpage, interstate.term, interstate.billing, 
intrastate.state, intrastate.intrarate, international.country, 
international.intlrate
FROM         international, intrastate, interstate
WHERE       international.company_intl = intrastate.company_intra AND
                    intrastate.company_intra = interstate.company_inter AND
                    (intrastate.state = '#form_state#') AND 
(international.country = '#form_country#')
ORDER BY  international.intlrate, interstate.interrate, intrastate.intrarate
</CFQUERY>


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.

------------------------------------------------------------------------------
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