<cfparam name="passedUserID" default=""> <cfset passedUserID = "#Trim(Url.id)#"> <CFQUERY NAME="getJobs"> SELECT filmID, directorID, actorID, animatorID, decoratorID FROM actor, director, animator, decorator WHERE "#Trim(passedUserID)#" = actor.actorID OR "#Trim(passedUserID)#" = director.directorID OR "#Trim(passedUserID)#" = animator.animatorID OR "#Trim(passedUserID)#" = decorator.decoratorID </CFQUERY>
Here's my code to display:
<cfoutput query="getJobs"> <!--- query the films now ---> <cfquery name="getFilms"> select * from films Where id = #getJobs.filmID# </cfquery> <!--- set variables to use in output display ---> <cfloop from="1" to="nCount" index="i" step="1"> <cfset film#i# = "#getFilms.title#"> </cfloop> </cfoutput> <!--- display the results ---> <cfloop from="1" to="nCount" index="i"> <cfoutput> <tr> <td>#film[i]#</td> </tr> </cfoutput> </cfloop>
Coldfusion doesn't seem to like where I'm trying to set film#i# - but I can't for the life of me figure out what's wrong
Here's my error message:
Invalid CFML construct found on line 43 at column 65. ColdFusion was looking at the following text: # The CFML compiler was processing: a cfset tag beginning on line 43, column 55. a cfset tag beginning on line 43, column 55. The error occurred in F:\Inetpub\wwwroot\people\display.cfm: line 43 41 : <!--- set variables to use in output display ---> 42 : <cfloop from="1" to="nCount" index="i" step="1"> 43 : <cfset film#i# = "#getFilms.title#"> 44 : </cfloop> 45 : </cfoutput>

New Topic/Question
Reply



MultiQuote




|