View Single Post
Old 05-13-2003, 03:01 PM  
twitchkat
Registered User
 
Join Date: Apr 2003
Posts: 2
Code:
{

    $sql = "DELETE FROM poly_links WHERE id=$id";

    $result = mysql_query($sql);

    echo "News Deleted.";

}
I bet $id hasn't been defined when you set $sql.

You can verify this by putting:

Code:
die("SQL QUERY: " . $sql);
after the $sql assignment. If it resolves to:

DELETE FROM poly_links WHERE id=

then that's not valid SQL.

Grumpy's quoting suggestion is good practice.
twitchkat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote