I have variables passed from a link into a mysql query, which after the variables have been converted looks like this:
$sql2="DELETE FROM Products WHERE ID="1" AND ProdCat="Vintage" AND SubCat="Victorian" AND ProdName="Oak Castle Brooch" AND ProdPrice="$150" AND ProdDesc="Circa 1860's mourning piece, style popularized by Queen Victorian after the death of her beloved Prince Albert. This brooch is made from bog oak, meticulously carved castle scene with leaf motif. 1 3/4" AND ProdMisc="NA" AND ProdDate="08/17/2002" AND ProdImage="<a href='/Jazz/Vintage/bogoakcastlepin.jpg'><img src='/Jazz/Vintage/bogoakcastlepin.jpg' height='100' width='100' border='0' align='left'></a>" LIMIT 1";
The original code is:
$sql2="DELETE FROM Products WHERE ID=\"$ID\" AND ProdCat=\"$ProdCat\" AND SubCat=\"$SubCat\" AND ProdName=\"$ProdName\" AND ProdPrice=\"$ProdPrice\" AND ProdDesc=\"$ProdDesc\" AND ProdMisc=\"$ProdMisc\" AND ProdDate=\"$ProdDate\" AND ProdImage=\"$ProdImage\" LIMIT 1";
mysql_query($sql3,$link)or die("<p>Error performing query: " . mysql_error() . "</p>");
I never get any errors or anything, it acts as if everything is okay. But the product is never deleted from the database. What is going wrong?