That means there are no values selected

Try this:

WHERE           peopleSummaryPeriod = #getcurrentperiod.peopleSummaryPeriod#
<cfif IsDefined("form.availabletest") AND form.availabletest NEQ "">
    AND                 ps.peopleSummary_peopleId IN (#form.availabletest#)
</cfif>

-----Original Message-----
From: Toby King [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 03, 2007 10:37 PM
To: CF-Talk
Subject: Re: code not working

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



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290123
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to