View Full Version : mysql asp delete not working

08-17-2006, 01:29 PM

i have a script in asp connecting to mysql with a simple delete query:

DELETE * FROM table WHERE id = 48

the table exists, the row exists and it is an integer

why doesn't it work?

error below.

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

08-17-2006, 02:00 PM
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.