yes id is my unique primary key.  I tried adding a cfoutput to display it,
and it is correct.

I started without the LIMIT 1, but had the same exact results.  So I stuck
it in there in hopes it would take care of the problem.

-Mike

-----Original Message-----
From: Dave Watts <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Date: Tue, 1 Jun 2004 18:16:36 -0400
Subject: RE: deleting db entries..

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