Hi!
We have some sites that were on an old 4.0+ server that
were just moved to a 4.5+ server. All the sites work just
great except one. This particular site now gives this
error:
The QUERY attribute of the tag does not specify the name of
an available query.
Normally, this error says all that needs to be said, but in
this case I have no idea. The code worked fine on the old
server :| Here's the offending code:
<CFQUERY datasource="visionquake" name="getgroups">
SELECT title, pageID
FROM pages
WHERE level = 1
ORDER BY orderID
</cfquery>
<CFOUTPUT query="getgroups">
<CFQUERY datasource="visionquake" name="#CurrentRow#">
SELECT title, pageID, level1
FROM pages
WHERE level = 2 AND level1 = #pageID#
ORDER BY orderID
</cfquery>
</cfoutput>
<SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
<!--
if (isMenu) {
<CFSET count = 0>
<cfoutput query="getgroups">
<CFSET count = #count# + 1>
arMenu#CurrentRow# = new Array(
"",
"",107,
"","",
"","",
"","",
<CFSET lister = ''>
<CFSET listnames = ''>
<cfloop query="#CurrentRow#"> <!--- here is the problem --->
<CFSET subsub = 0>
<CFLOOP query="#URLEncodedFormat(title)#"><CFSET
subsub = #count#></cfloop>
"#title#","page.cfm?pageID=#pageID#",
<CFIF subsub IS NOT 0>1<CFELSE>0</cfif>
<CFIF CurrentRow IS NOT RecordCount>,</cfif>
<CFSET lister = ListAppend(lister,subsub)>
<CFSET listnames = ListAppend
(listnames,'#URLEncodedFormat(title)#')>
</cfloop>
)
<CFSET num = 0>
<CFLOOP index="i" list="#lister#">
<CFSET num = #num# +1>
<CFIF i IS NOT 0>
arMenu#i#_#num# = new Array(
<CFLOOP query="#ListGetAt
(listnames,num)#">
"#title#","page.cfm?
pageID=#pageID#",0
<CFIF CurrentRow IS NOT
RecordCount>,</cfif>
</cfloop>
)
</cfif>
</cfloop>
</cfoutput>;
;
}
//-->
</SCRIPT>
Thank for any help, I think I've put some dents in the wall
where I've banged my head against it :)
Christine
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists