Quote:
Originally Posted by BluePanther
Can't see the error on my phone, but make sure the form input names match up to the POST array keys
|
They do.. here's the error in text:
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 'AND cpm >' at line 1
in the input form:
<input size=10 type=text id=
tagval name=
tagval>
<input type=text size=2 id=
cpmval name=
cpmval>
in the action file:
$
tagval = mysql_real_escape_string($
tagval);
$
cpmval = mysql_real_escape_string($
cpmval);
DELETE FROM {$table} WHERE tag = $tagval AND cpm > $cpmval
Code:
$tagval = mysql_real_escape_string($tagval);
$cpmval = mysql_real_escape_string($cpmval);
$sql = mysql_query("DELETE FROM {$table} WHERE tag = $tagval AND cpm > $cpmval " );
if (!$sql) {
die(mysql_error());
}