Hi:
I was working on a page which was sending some URL variables to another page
and I figured out that using cflocation could help me there but every time I
use cflocation the following error comes back:
Syntax error (missing operator) in query expression 'Tbl_Users.UserID =
Tbl_AccOrders.UserID AND Tbl_Accessories.PrID = Tbl_AccOrders.PrID AND
Tbl_AccOrders.OrederID = 23 AND Tbl_AccOrders.UserID = 98'.
I checked it with a usual link and sending URL variables and it worked just
fine but when I use cflocation it seems something goes wrong!!! I wonder
what is different in sending data from a page to another in CFLOCATION and a
uaual link with ?variablex=...
I write down more of my code for more clearance.
Page1:
<!--- it is clear that I want to check if the user has had entered the same
product or not. If yes then it goes to another page to edit the order for
the product if not it goes to INSERT INTO code to add the order.--->
<cfquery name="rsCheckdup" datasource="#Request.DSN#">
SELECT OrederID, UserID, PrID, Quantity, Orderstat, OrderDate, AdminDesc,
Price, PreOrderNo, OrderNo
FROM Tbl_AccOrders
WHERE UserID = #Session.UserID#
AND PrID = #Form.PrID#
AND Orderstat = 'wait'
</cfquery>
<cfif rsCheckdup.recordCount GT "0">
<!--- here is the cflocation code which I want to send some URL Variables
here --->
<cflocation
url="/dampezeshki_final/Accessories/SingleAccessories_PurchEdit.cfm?OrderID=<cfoutput>#rsCheckdup.OrederID#</cfoutput>"
addtoken="no">
<cfelse><!--- here I say if it is not in the database so insert it --->
<cfquery datasource="#Request.DSN#">
INSERT INTO Tbl_AccOrders (UserID, PrID, Quantity, Orderstat, Price)
VALUES
(
"#Session.UserID#"
,
"#FORM.PrID#"
,
"#FORM.Quantity#"
,
"wait"
,
'#prprice#'
)
</cfquery>
</cfif>
<!--- end of page one--->
page2:
<!--- here is the query which uses the URL Variables from page one. I didn't
write in this post the UPDATE codes to save the space and just used a
cfoutput for tets. --->
<cfquery name="rsEditOrder" datasource="#Request.DSN#">
SELECT Tbl_Accessories.PrID,
Tbl_Accessories.PrName,
Tbl_Accessories.PrType,
Tbl_Accessories.PrManufacturer,
Tbl_Accessories.PrSupplier,
Tbl_Accessories.PrMeasures,
Tbl_Accessories.PrPrice,
Tbl_Accessories.PrDescription,
Tbl_Accessories.ImageS1,
Tbl_AccOrders.OrederID,
Tbl_AccOrders.UserID,
Tbl_AccOrders.PrID,
Tbl_AccOrders.Quantity,
Tbl_AccOrders.Orderstat,
Tbl_AccOrders.OrderDate,
Tbl_AccOrders.AdminDesc,
Tbl_AccOrders.Price,
Tbl_AccOrders.PreOrderNo,
Tbl_AccOrders.OrderNo,
Tbl_Users.UserID,
Tbl_Users.UserName,
Tbl_Users.FistName,
Tbl_Users.LastName,
Tbl_Users.TelephoneNumber,
Tbl_Users.FaxNumber,
Tbl_Users.Address,
Tbl_Users.EmailAddress,
Tbl_Users.WebSite,
Tbl_Users.UserTypeID
FROM Tbl_Accessories ,
Tbl_AccOrders ,
Tbl_Users
WHERE
Tbl_Users.UserID = Tbl_AccOrders.UserID
AND
Tbl_Accessories.PrID = Tbl_AccOrders.PrID
AND
Tbl_AccOrders.OrederID = #URL.OrderID#
AND
Tbl_AccOrders.UserID = #Session.UserID#
</cfquery>
<cfoutput>#rsEditOrder.PrName#</cfoutput>
</br>
<cfoutput>#rsEditOrder.FistName#</cfoutput>
<!--- here it ends--->
the following error comes when I test the pages.
Error Executing Database Query. Syntax error (missing operator) in query
expression 'Tbl_Users.UserID = Tbl_AccOrders.UserID AND Tbl_Accessories.PrID
= Tbl_AccOrders.PrID AND Tbl_AccOrders.OrederID = 23 AND
Tbl_AccOrders.UserID = 98'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300814
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4