SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,714
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Is my query right?

    Do I have the proper syntax for the below query...?

    Code:
    mysql_query("DELETE FROM table WHERE `ID` = $row");
    I'm trying to remove an entry from table based on whether the PHP variable "$row" matches ID. Right now, it works, but I seem to remember writing similar queries in the past that were written incorrectly.

    Feel free to provide any insight into this, too. I'm no MySQL guru by any means.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,336
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    looks okay to me

    if you can, go dig up one of your queries from the past that didn't work, and let's have a look at how it differs...
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


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
  •