Answered
Multiple WHERE values in cfquery
Hello,
I am currently working on a project that involves extracting rows from an SQL table, under several different WHERE values.
This is my current code:
As you can see, where I have used '#otherqueryname.3#', I am trying to output several 3s. Obviously, this piece of code doesn't work.
I have also tried using <cfoutput>'#otherqueryname.3#',</cfoutput> but that results in an error due to the remaining comma. I have also tried using <cfoutput>#valuelist(otherqueryname.3)#</cfoutput> but it results in only one 3 actually fetched.
Please help me with a solution to using several WHERE values.
Thanks!
Aiden Camichel
NOTE: I am also trying to find a reasonable way of applying a file size upload limit to cffile. Any help would be much appreciated.
I am currently working on a project that involves extracting rows from an SQL table, under several different WHERE values.
This is my current code:
quote:
<cfquery datasource="sourcename" name="queryname">
select 1,2
from tablename
where 2=<cfoutput>'#otherqueryname.3#'</cfoutput>
</cfquery>
As you can see, where I have used '#otherqueryname.3#', I am trying to output several 3s. Obviously, this piece of code doesn't work.
I have also tried using <cfoutput>'#otherqueryname.3#',</cfoutput> but that results in an error due to the remaining comma. I have also tried using <cfoutput>#valuelist(otherqueryname.3)#</cfoutput> but it results in only one 3 actually fetched.
Please help me with a solution to using several WHERE values.
Thanks!
Aiden Camichel
NOTE: I am also trying to find a reasonable way of applying a file size upload limit to cffile. Any help would be much appreciated.
