Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

URL Variables Working on one Server, Fail on the Other Server

0 views
Skip to first unread message

mareltrout

unread,
Nov 11, 2003, 9:51:50 AM11/11/03
to
I am going nuts with this one: I have a ColdFusion include file that is passing a variable to a display page. It works fine on one server. But on another server, when I click the link in the include's menu it sends me to the display page where the correct variable is displayed in the URL but ALL the records are displayed on the page, one right after the other. It's as though the SQL query on the display page is missing the URL variable. But it's not.

The files on each server are identical. Both servers are running CFMX 6.1. What the heck is going on?

Marel Trout


xplosive

unread,
Nov 12, 2003, 8:51:19 AM11/12/03
to
Any chance of seeing some code to get a feel for what is actuially happening?


Mark Skeet
xplosivedesign

If your question has been answered please mark it as answered.

mareltrout

unread,
Nov 14, 2003, 9:26:49 AM11/14/03
to
Sure, no problem:

On the referrer page:

<!--- query --->
<CFQUERY NAME="GetContacts" DATASOURCE="DataSourceName">
SELECT DeptID,
DeptName
FROM tblDeptContact
WHERE Office = 1
ORDER BY DeptName
</CFQUERY>
<!--- / query --->

<!--- output --->
<cfoutput query="GetContacts">
<a href="Contacts2.cfm?DeptID=#GetContacts.DeptID#">#GetContacts.DeptName#</a>
</cfoutput>
<!--- / output --->

On Contacts2.cfm:

<!--- query --->
<cfquery name="GetThisContact" datasource="DataSourceName">
SELECT *
FROM tblDeptContact
WHERE DeptID = #URL.DeptID#
</cfquery>
<!--- / query --->

<!--- output --->
<cfoutput query="GetThisContact">
#Variable# #Variable# #Variable# ......
</cfoutput>
<!--- / output --->

Like I said, this works fine on one server: Contacts2.cfm displays the one record identifed in the URL.

On the other server, the page catching the variable appears to be catching it OK. The URL looks right; it has the correct ID. But the display is dumping ALL the records into the page, not the one identified by the ID. Programming identical on both servers.

And get THIS: Just now I happened to change the name of the referrer page. Suddenly the whole thing WORKED FINE on the server where the problem was.

Is this some weird kind of cacheing going on?

Thanks,

mt


0 new messages