> I know its advised against deleting database entries, but
> where am I going wrong here?

There's absolutely nothing wrong with deleting unwanted database records.

> 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>

Is the "id" field a primary key? If not, are there duplicate values within
that field? (Or, perhaps more appropriately, were there duplicate values
before you ran your DELETE statement?)

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to