Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Deleting Error

  1. #1
    New Coder
    Join Date
    May 2006
    Posts
    29
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Deleting Error

    When I try to Delete a Row from the MySQL Database I got that error
    PHP Code:
    SQL Statement :"DELETE FORM `books` WHERE bid=2"

    query error:
    1064
    You have an error in your SQL syntax
    check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE bid=2' at line 1
    File 
    :
    Line 
    this MySQL code is work fine at PHPMyAdmin and I don't know why I had problem in my script

    PHP Code:
    $DB->query"DELETE FORM `books` WHERE bid={$bid}" ); 

  • #2
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts
    It's just a typo. You have "DELETE FORM". It should be "DELETE FROM".

  • #3
    New Coder
    Join Date
    May 2006
    Posts
    29
    Thanks
    10
    Thanked 0 Times in 0 Posts
    Thanks


  •  

    Posting Permissions

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