Link to home
Start Free TrialLog in
Avatar of Dusty
DustyFlag for United States of America

asked on

Coldfusion Form submit / SQL question

I have added "multiple" to my select dropdown, but I'm not sure how to adjust my SQL query on the action page to compensate for multiple city selections? Any help appreciated!

User generated image
<cfselect name = "City" query = "city" value = "City" queryPosition="below" selected = "#prefillCity#" class="selectpicker show-menu-arrow span6" multiple>
      <option value=" ">All Cities</option>
      </cfselect>


<!---QUERY ON FORM ACTION PAGE--->
<cfquery name="listings" datasource="datasource" result="result">
SELECT * from res INNER JOIN seo on res.Listid = seo.Listid
WHERE 0=0

<!---Search by City--->
<cfif StructKeyExists(form,"City") and len(trim(form.City))>
 AND City = '#form.City#'
</cfif>
ASKER CERTIFIED SOLUTION
Avatar of _agx_
_agx_
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dusty

ASKER

Works perfect! Thanks _agx_.