Hi there im trying to count numbers in fields of a table but i get the error message: FUNCTION starwarsbattles.COUNT does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
Whats up with my code?
Thanks
$colname_resultp = "-1";
if (isset($_SESSION['MM_Username'])) {
$colname_resultp = (get_magic_quotes_gpc()) ? $_SESSION['MM_Username'] : addslashes($_SESSION['MM_Username']);
}
mysql_select_db($database_swb, $swb);
$query_resultp = sprintf("SELECT COUNT (Class1, Class2, Class3, Class4) FROM planet WHERE PlayerName = %s", GetSQLValueString($colname_resultp, "text"));
$resultp = mysql_query($query_resultp, $swb) or die(mysql_error());
$row_resultp = mysql_fetch_assoc($resultp);
$totalRows_resultp = mysql_num_rows($resultp);