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 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Location
    Adelaide, Australia
    Posts
    472
    Thanks
    3
    Thanked 0 Times in 0 Posts

    mysql asp delete not working

    hi.

    i have a script in asp connecting to mysql with a simple delete query:
    Code:
    DELETE * FROM table WHERE id = 48
    the table exists, the row exists and it is an integer

    why doesn't it work?

    error below.


    Code:
    Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 
    
    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 '* FROM table WHERE id = 48' at line 1 
    
    /cfb-internal/dbase.asp, line 41

  • #2
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,633
    Thanks
    4
    Thanked 148 Times in 139 Posts
    It doesn't work because your syntax is incorrect. Delete works on an entire row so you don't have to specify the column. Remove the * and your delete will work.


  •  

    Posting Permissions

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