Link to home
Start Free TrialLog in
Avatar of jsctechy
jsctechyFlag for United States of America

asked on

SQL statement

why am i getting an error on this page:
<html>
<head>
<title>Deleting Contact...</title>
</head>

<body>
<cfquery name = "DeleteContact" datasource = #application.dsn#>
DELETE *
FROM Contacts
WHERE ContactID = #url.ContactID#
</cfquery>

<cflocation url = "deletedContact.cfm?alphaindex=#url.alphaindex#">
</body>
</html>

The error says that incorrect syntax is near *.
Thanks
ASKER CERTIFIED SOLUTION
Avatar of mkishline
mkishline

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jsctechy

ASKER

how can i do that after the click is done and the deletion is been done to route the user to this page:
deletecontact.cfm?
Avatar of mkishline
mkishline

I'm not sure that I understand your question. It appears that to delete a person, a user would go to the page you've shown specifying an ID number in the URL, and then after the person has been deleted, they are redirected to the deletedContact.cfm page.