How do i count non-null variables in php database?(SQL)
this is my existing code and database in the picture
$jack5 = mysql_fetch_array(mysql_query("SELECT * FROM z3 WHERE ID='$users_Names' AND Score IS NOT NULL "));
echo $jack5;
Try this:
$result = mysql_query("SELECT * FROM z3 WHERE ID='$users_Names' AND Score IS NOT NULL "));
$rowCount = mysql_num_rows($result); // It will return the number of rows in result set