Add this function to your CFC and then call it from your template and
output the result. What do you get? What happens when you run the output
from this directly against your database server. My initial guess is that
you have an issue with your cfqueryparams when you are passing in list
variables. First, you cannot have a column equal a list. You can have a
column value be IN a list. So that's something else you might want to
try...
<cfif len(arguments.orderKeyList)> AND o.tablePK IN (<cfqueryparam
value="#arguments.orderKeyList#" cfsqltype="CF_SQL_INTEGER" list="Yes">)
</cfif> <cfif len(arguments.personKeyList)> AND o.tblPeopleFK IN
(<cfqueryparam value="#arguments.personKeyList#" cfsqltype="CF_SQL_INTEGER"
list="Yes">) </cfif>
Otherwise, create the function below and dump the output. then get back to
us.
<cffunction access="public" name="out_ordersGet" output="no"
returntype="string"> <cfargument name="orderKeyList" type="string"
required="no" default=""> <cfargument name="personKeyList" type="string"
required="no" default=""> <cfsavecontent variable="ret"><cfoutput>
SELECT o.tablePK ,o.tblPeopleFK
,o.createdOn ,o.shippingMethod
,o.itemSubTotal ,o.totalBeforeTax ,o.tax
,o.shippingCost ,o.total
,p.firstName + ' ' + p.lastName AS name FROM
#request.sqlObjectPrefix#tblOrders o INNER JOIN
#request.sqlObjectPrefix#tblPeople p ON o.tblPeopleFK =
p.tablePK WHERE 1 = 1 <cfif len(arguments.orderKeyList)>
AND o.tablePK = #arguments.orderKeyList# </cfif> <cfif
len(arguments.personKeyList)> AND o.tblPeopleFK =
#arguments.personKeyList#" </cfif> </cfoutput></cfsavecontent>
<cfreturn ret> </cffunction>
--
Jeff
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:370894
Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-community/unsubscribe.cfm