well you shouldn't need the "limit 1", but I'm guessing that the value of "#entrytodelete#" is not correct...tell us what it is ;-)
BTW...who said deleting database entries was a bad idea? It can be if you need to maintain a history of some kind (in which case you set a flag to indicate the record has been "deleted")...but there are MANY cases where deleting is just fine
Cheers
Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]
---------------------------------------------------------
Macromedia Associate Partner
www.macromedia.com
---------------------------------------------------------
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com
----- Original Message -----
From: techmike
To: CF-Talk
Sent: Tuesday, June 01, 2004 12:28 PM
Subject: deleting db entries..
I know its advised against deleting database entries, but where am I going
wrong here?
This statement works, but deletes all table entries rather than the id of
the one specfied..
The only thing I can think of is it is a query inside of another query..
Total brainfart here..
<cfquery datasource="mysql">
DELETE FROM table_name
WHERE id = #entrytodelete# LIMIT 1
</cfquery>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Is my init() function's access private or package? Jeff Small
- deleting db entries.. techmike
- RE: Is my init() function's access private or pac... Bryan Stevenson
- RE: Is my init() function's access private or package... Dave Watts