Hi there I have a slight problem with a query (maybe its just the approach that I have taken) so would appreciate any thoughts/feedback).
I have a development website that I am trying to finalise. The website can be viewed at: http://202.157.179.158/csandbdirectory The problem that I have rests with the selecting options from the advanced search options. Basically I seem to be able to get results if I select a procedure and select a specific state. However I do not seem to get results if I select a Product/Procedure and don't select a state or try to select ALL states. Here is my query. <cfquery name="qGetAdvertisers" datasource="#request.db_dsn#" username="#request.db_login#" password="#request.db_pwd#"> Select * From tbl_advertisers tbl_advertisers, tbl_procedures tbl_procedures, tbl_states tbl_states, tbl_advertiserstates tbl_advertiserstates, tbl_advertiserprocs tbl_advertiserprocs Where ( tbl_advertisers.advertiserid = tbl_advertiserprocs.advertiserid And tbl_procedures.procedureid = tbl_advertiserprocs.procedureid And tbl_advertisers.advertiserid = tbl_advertiserstates.advertiserid And tbl_states.stateid = tbl_advertiserstates.stateid <!--- Search by procedureid ---> <cfif FORM.ProcedureID IS NOT ""> AND tbl_procedures.ProcedureID = '#Form.ProcedureID#' </cfif> <!--- Search by stateid ---> <cfif FORM.stateid IS NOT ""> AND tbl_states.stateid = '#FORM.stateid#' </cfif> ) </cfquery> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267203 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

