Re: A MySQL question
| From: | Chris Shiflett | Date: | Mon, 14 Jul 2003 21:20:06 +0000 |
| Subject: | Re: A MySQL question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-155179@lists.php.net to get a copy of this message | ||
--- zavaboy <zavaboy@hotmail.com> wrote:
> Lets say the table contains the following rows (user | item):
> 582-668243 | Toothbrush
> 582-668243 | Toothbrush
> 582-668243 | Toothbrush
...
> Anyway, how can I remove only 1 Toothbrush from user 582-668243?
With the information you provided, you can't. You should never have multiple
rows in the database that are non-unique, and this is one reason why. You need
a primary key.
> I just want the query
You should rather spend your time learning some database fundamentals rather
than asking this list (not a database list, in fact) for spoon-fed answers. You
will appreciate the knowledge more than the answer.
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/