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

Filter List

0 views
Skip to first unread message

CFDEBUG

unread,
Dec 31, 2002, 9:55:27 AM12/31/02
to
Do the following

1) In your storedirectory.cfm, modify the below line
<a href="StoreReviews.cfm?StoreID=#StoreID#">#StoreName#</a>
to
<a href="StoreReviews.cfm?StoreID=#StoreID#&streetID=#url.StreetID#">#StoreName#</a>

2) In your StoreReviews.cfm, modify the code
<A href="RateDirectory.cfm?StoreID=71">Rate Us!</a>
to
<A href="RateDirectory.cfm?StoreID=71&StreetID=#URL.StreetID#">Rate Us!</a>

3) In your RateDirectory.cfm, modify the code
<FORM ACTION="RateDirectoryResults.cfm" METHOD="post">
to
<FORM ACTION="RateDirectoryResults.cfm?StreetID=#URL.StreetID#" METHOD="post">

4) In your RateDirectoryResults.cfm, modify your code that calls the StoreDirectory.cfm back again to include the StreetID=#URL.StreetID#



Kimbrly

unread,
Dec 31, 2002, 10:18:40 AM12/31/02
to
Ok... i changed everything except #4....

i'm unsure what to do here.....

Here is my code for that page...

<CFSET request.dsn = "SidewalkSavvy">

<CFSET thisAverage=Round((FORM.TXTSLIDERWEIGHT_0 + FORM.TXTSLIDERWEIGHT_1+ FORM.TXTSLIDERWEIGHT_2 + FORM.TXTSLIDERWEIGHT_3)/4)>

<CFQUERY name="getStreetID" DATASOURCE="#request.dsn#">
Select StreetID, StoreName, StoreID
From StoreDirectory
Where StoreName='#form.Name#'
</cfquery>

<!--- <CFQUERY NAME="UpdateNumofReviews" DATASOURCE="#request.dsn#">
UPDATE StreetDirectory
SET NumberofReviews=NumberofReviews+1
WHERE StreetID=#url.StreetID#
</CFQUERY> --->

<CFQUERY name="getAVGrating" DATASOURCE="#request.dsn#">
Select StoreID, AVGrating
From StoreReviews
Where AVGrating=#thisAverage#
</CFQUERY>

<CFQUERY name="insertrequest" DATASOURCE="#request.dsn#">
Insert Into StoreReviews
(
StreetID,
StoreID,
RatingLink,
Atmosphere,
Price,
Service,
Quality,
AVGrating,
PostedBy,
PostedDate,
Review

)
values
(
#getStreetID.StreetID#,
#getStreetID.StoreID#,
'<img src="Images/#Round(getAVGrating.AVGrating)#Stars.bmp">',
#FORM.TXTSLIDERWEIGHT_0#,
#FORM.TXTSLIDERWEIGHT_1#,
#FORM.TXTSLIDERWEIGHT_2#,
#FORM.TXTSLIDERWEIGHT_3#,
#getAVGrating.AVGrating#,
'#form.PostedBy#',
#CreateODBCDate(DateFormat(now(),"mm/dd/yy"))#,
'#form.Review#'
)
</CFQUERY>


Kimbrly

unread,
Dec 31, 2002, 11:00:00 AM12/31/02
to
Error...

<meta http-equiv="refresh" content="2;url=StoreDirectory.cfm?StreetID=

--------------------------------------------------------------------------------

Error Occurred While Processing Request
Error Diagnostic Information

An error occurred while evaluating the expression:

#url.streetID#

Error near line 61, column 72.
--------------------------------------------------------------------------------

Error resolving parameter URL.STREETID

The specified URL parameter cannot be found. This problem is very likely due to the fact that you have misspelled the parameter name.

The error occurred while processing an element with a general identifier of (#url.streetID#), occupying document position (61:71) to (61:84) in the template file F:\InetPub\wwwroot\sidewalksavvy\database\RateDirectoryResults.cfm.



CFDEBUG

unread,
Dec 31, 2002, 11:16:11 AM12/31/02
to
1) Im not sure whether you can cf tags inside the meta tag. But try giving

<meta http-equiv="refresh" content="2;url=StoreDirectory.cfm?StreetID=1"></meta>

and see whether it works. If it works, then it just doesn't allow cftags. In that case, you can do the second step.

2) Also you can use javascript and cflocation to do the same functionality. After all the inserts,

<script language="Javascript">
alert("Your rating has been saved");
</script>

<cflocation url="StoreDirectory.cfm?StreetID=URL.StreetID">



Kimbrly

unread,
Dec 31, 2002, 11:39:01 AM12/31/02
to
OK...

I tried replacing the StreetID=1 and that worked! so, then i did the <cflocation> you wrote below, and i got a crazy error...

Syntax error (missing operator) in query expression 'StoreDirectory.StreetID ='.

SQL = "SELECT StoreDirectory.StoreID, StoreName, AVG(AVGrating) AS storeAVGrating FROM StoreDirectory LEFT JOIN StoreReviews ON StoreDirectory.StoreID=StoreReviews.StoreID WHERE StoreDirectory.StreetID = GROUP BY StoreDirectory.StoreID, StoreName ORDER by StoreName"

Data Source = "SIDEWALKSAVVY"

The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (4:1) to (4:53) in the template file F:\InetPub\wwwroot\sidewalksavvy\database\StoreDirectory.cfm.

So i guess the problem is the cftags in the code....


0 new messages