"Zavaboy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ok, I want to delete only 1 row off of a database table... > Example: > I have a table with columns "user" and "item"... > Lets say the table contains the following rows (user | item): > 582-668243 | Toothbrush > 582-668243 | Toothbrush > 582-668243 | Toothbrush > 582-668243 | Trash can > 582-668243 | Trash can > 582-668243 | Something else > 582-668243 | Something else > 582-668243 | Something else > 582-668243 | Something else > 720-387690 | Dog treats > 720-387690 | Car > 720-387690 | Car > 720-387690 | Toothbrush > 720-387690 | Toothbrush > > Ok, user 582-668243 is buying a lot, eh? LoL > Anyway, how can I remove only 1 Toothbrush from user 582-668243? > I just want the query... I've been trying to find it out for a few hours > now... > > Thanks in advance! > > -- > > - Zavaboy > [EMAIL PROTECTED] > www.zavaboy.com
You can try putting "LIMIT 1" on the end of your query but to be honest I don't know if LIMIT works with the DELETE command. Worth a try. Ideally you should have an additional column with an autoincrementing value to act as your primary key and you delete on that key. - Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php