Can you check that this query is correct, when I go to open it in the bindings panel I get the message MySQL Error#: 1064
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 'table
WHERE 0 = 1' at line 1
$query_rsAVGRATING = sprintf("SELECT AVG(rating) AS averageRating FROM table WHERE ID = %s", GetSQLValueString($colname_rsAVGRATING, "int"));
$rsAVGRATING = mysql_query($query_rsAVGRATING, $con2com) or die(mysql_error());
$row_rsAVGRATING = mysql_fetch_assoc($rsAVGRATING);
$totalRows_rsAVGRATING = mysql_num_rows($rsAVGRATING);