you can. try:
<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.availabletest#"
list="yes"> instead of your #form.availabletest#
but i think you should also do:
INNER JOIN dbo.People AS p ON p.people_Id = ps.peopleSummary_peopleId
WHERE peopleSummaryPeriod =
#getcurrentperiod.peopleSummaryPeriod#
<cfif len(trim(form.availabletest))>
AND ps.peopleSummary_peopleId IN (<cfqueryparam
cfsqltype="cf_sql_varchar" value="#form.availabletest#" list="yes">)
</cfif>
and make sure that you cfparam your from.availabletest at the top of your page!:
<cfparam name="form.availabletest" default="">
Azadi
Toby King wrote:
> I keep on getting an error now
>
> Incorrect syntax near ')'
>
>
>
> INNER JOIN dbo.People AS p ON p.people_Id = ps.peopleSummary_peopleId
> WHERE peopleSummaryPeriod =
> #getcurrentperiod.peopleSummaryPeriod#
> AND ps.peopleSummary_peopleId IN
> (#form.availabletest#)
>
> It bworks if I have selections made but I hit the query first and it strikes
> this issue.
>
> Can I use a cfqueryparam or something to get around this issue.
>
> Tkx in advance.
>
>
>
>
>> Try:
>> where peopleid IN (#form.availabletest#)
>>
>>
>> For some reason when I dumped the form neither of the boxes were displayed
>> as being in the form and I have not been able to figure out why - its a
>> mystery.
>>
>> So I have decided on an alternative strategy initially.
>>
>> Hi there
>>
>> I have now placed a select list on a page which is working properly. I have
>> dumped the form and if I select 3 records from the list I have 3 items
>> selected. So good so far.
>>
>> These 3 items are recordids - I want to use them in a query such as
>>
>> The code shows the select list and then after that is the query to select
>> the records to use later on in the page.
>>
>> Thanks in advance.
>>
>> Toby
>>
>>
>> <select name="availabletest" size="10" multiple style="width:200;"> <cfloop
>> query="getpeople"> <option value="#people_id#">#People_LastName#,
>> #People_FirstName#</option> </cfloop> </select>
>>
>>
>>
>> SELECT p.people_id,
>> p.people_FirstName,
>> p.people_LastName
>>
> >From tbl_people p
>
>> where peopleid = #form.availabletest#
>> order by p.people_Lastname
>>
>>
>> Thanks in advance for feedback
>>
>> T
>>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290124
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4