Or maybe it is something else...

I have a list of cities in a form with multiple enabled. Selected list is
submitted (as form.by_city) to a template with the following query:

<cfquery name="lis_by_city" datasource="xyz">
 SELECT ID, sale_price,Address, City
 FROM properties
 WHERE City IN ('#PreserveSingleQuotes(form.by_city)#')
</cfquery>

If only one city is selected in the form, the processing template works
fine, displaying all properties  for a selected city.

But if two or three are selected, then nothing is displayed, i.e. query does
not retreive any records.

If I remove single quotes around ##, I get "Invalid Number of Parameters,
Expected 1"

I have similar queries  that work OK with IDs in the same way:

WHERE ID IN (#PreserveSingleQuotes(form.by_type)#)

//by_type is a list genetrated by a multiple <select> where values are
integers. In the City example above, <option> values are, naturally,
strings.



Thanks,

Cyrill Vatomsky
Linguacom

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