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 '-100,100' at line 1
Why do I keep getting the above error message?
$numrows = 0;
for($x = 0; $x <= $i; $x++) {
$pp = $pp[$x];
$query = "SELECT count(*) FROM opent WHERE approve = 'Y' AND pp = '" . $pp . "' ORDER BY id desc";
$result = mysql_query($query) or trigger_error("SQL", E_USER_ERROR);
$query_data = mysql_fetch_row($result);
$numrows = $query_data[0] + $numrows;
}