SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot alfred3x's Avatar
    Join Date
    Aug 2003
    Location
    Toronto
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Deleting Several Rows With Individual ID's

    I have a web page where the user can cherry pick a number of records to be deleted. So, now I have a list of ID's to be deleted. Is there a better way to delete these than sending individual delete statements?

    Thx for the help.
    - A. Alfred Ayache
    PHP/MySQL ZCE

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Code:
    delete sometable where id in (1, 2, 3)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •