simple sql query help

Associate
Joined
30 Nov 2003
Posts
1,614
Im trying to delete a record from my sql table based on the record id. Heres what I have I cant see whats wrong with it. :confused:

Code:
$query = "DELETE * FROM news WHERE news_id = $newsid";

Throws me up this error:
Error in query: DELETE * FROM news WHERE news_id =13. 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 news WHERE news_id =13' at line 1
 
Nevermind I just needed to remove the *

Heres the query if anyone searching has the same problem in the future.

Code:
$query = "DELETE FROM news WHERE news_id = $newsid";
 
Back
Top Bottom