?
Solved

How to pass 2 values using  URLEncodedFormat

Posted on 2003-03-23
4
Medium Priority
?
489 Views
Last Modified: 2013-12-24
I want to pass 2 values called 'delOrder' and 'delOrder2' on the URL, and then delete records from a table based upon them. I'm having trouble getting the second value recognized using code along the lines of:

<!--- Code to pass the values on the URL line      --->
          <td>[ <a href="Order_Delete.cfm?delOrder=#URLEncodedFormat(ResultField1)#,delOrder2=#URLEncodedFormat(ID_Field)#" onClick="return confirm('Are you SURE you want to DELETE this record?')">DELETE</a>
              ] </td>

<!--- Code to delete the record from the database table --->
<cfquery name="deleteOrderSKUs" datasource="mparam">
DELETE FROM skialberta_Orders
WHERE SKU = '#url.delOrder#' .and. UID = '#url.delOrder2#'
</cfquery>

The error I get tells me that Cold Fusion cannot find a value for url.delOrder2, althoug you can see it being passed along in the URL. I wonder if the problem is with my ',' as the delimiter is example 1, and the '.and.' in example 2.  I've tried some variation in syntax with no luck.
0
Comment
Question by:TSellers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 

Accepted Solution

by:
demarco earned 1000 total points
ID: 8191084
a href="Order_Delete.cfm?delOrder=#URLEncodedFormat(ResultField1)#,delOrder2=#URLEncodedFormat(ID_Field)#" onClick="return confirm('Are you SURE you want to DELETE this record?')">DELETE</a>


er no mate
try

a href="Order_Delete.cfm?delOrder=#URLEncodedFormat(ResultField1)#&delOrder2=#URLEncodedFormat(ID_Field)#" onClick="return confirm('Are you SURE you want to DELETE this record?')">DELETE</a>


you need to use & not , to concernate the url
0
 
LVL 3

Author Comment

by:TSellers
ID: 8191528
Thanks demarco, that should do it. BTW, the statement: WHERE SKU = '#url.delOrder#' .and. UID = '#url.delOrder2#'

Is the syntax on that look OK?

Thanks again.
0
 

Expert Comment

by:demarco
ID: 8193772

cfquery name="deleteOrderSKUs" datasource="mparam">
DELETE FROM skialberta_Orders
WHERE SKU = '#url.delOrder#' .and. UID = '#url.delOrder2#'



remove the .'s from and I would think :)

cfquery name="deleteOrderSKUs" datasource="mparam">
DELETE FROM skialberta_Orders
WHERE SKU = '#url.delOrder#'
AND UID = '#url.delOrder2#'


if thats trowing errors remove the ' ' form he vars
esp if the vars are numeric and the db is access :)
0
 
LVL 3

Author Comment

by:TSellers
ID: 8193961
demarco, thanks,

I took the '.' away and that seemed to do the trick so I'm up and running now, thanks again.
0

Featured Post

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month11 days, 18 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question