As the title says
So in this example I would get 2 from the first row and 1 from the second.
$sql = "SELECT Passive, Q, W, E, R FROM champions WHERE Passive, Q, W, E, R IS NOT NULL AND Patch_No ='".$_GET['Patch_No']."' AND Champion = ".$row['champion']."";
$result = $conn->query($sql);
$rows = $result->num_rows;
EDIT Bigger part of code I'm trying to figure out no errors are showing up although this echo doesn't seem to be showing the numbers I want it to
if($result = $conn->query($sql)){
$champ_number = $result->num_rows;
$i = 1;
$champion = array();
$noofspellschamp = array();
while($row = $result->fetch_assoc()){
$champion[$i]=$row['champion'];
$sql2 = "
SELECT Passive, Q, W, E, R,
((Passive is not null) + (Q is not null) + (W is not null) + (E is not null) + (R is not null)
) as NumNotNull
FROM champions
WHERE Patch_No ='".$_GET['Patch_No']."' AND
Champion = ".$row['champion']."";
$result2 = $conn->query($sql2);
echo $result2;
$noofspellschamp[$i] = $result2;
$i+=1;
//echo $champion[count($row)];
}