On Fri, 6 Apr 2001, Vigile wrote:

> I have a table, that DOES NOT have a primary key, but is setup like this:
> 
>       Field Type Attributes Null Default Extra Action 
>       PageID  int(11)    No  0    Change Drop Primary Index Unique 
>       ArticleID  int(11)    No  0    Change Drop Primary Index Unique 
>       PageTitle  text    No      Change Drop Primary Index Unique 
>       Text  text    No      Change Drop Primary Index Unique 
> 
> 
> However, for some reason (I think I know why, but its not important) I have two of 
>every entry.  Such as this:
> 
> 1    69    words words
> 2    69    words words more
> 3    69    words words most
> 1    69    words words
> 2    69    words words more
> 3    69    words words most
> 
> So, when I am calling info from this database, I get doubles of each result.  How 
>can I delete just one of each entry, so I am left with just:
> 
> 1    69    words words
> 2    69    words words more
> 3    69    words words most
> 
> I can't do the delete that I was thinking about:
> 
> Delete FROM Pages Where Pageid=1 and articleid=69 because that would delete BOTH of 
>them.  Doh!  Any help?

How about:
delete from tablename where id=1 limit 1;

But you'd have to do it for id=1,2,3... Not so good.

regards,
thalis


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to