$q1 = “SELECT COUNT(thread_id)AS aa FROM table WHERE col = ‘a’”;
$q2 = “SELECT COUNT(thread_id)AS bb FROM table WHERE col = ‘b’”;
$r1 = @mysqli_query ($dbc, $q1) or trigger_error("Query: $q1\n
MySQL Error: " . mysqli_error($dbc));
$r2 = @mysqli_query ($dbc, $q2) or trigger_error("Query: $q2\n
MySQL Error: " . mysqli_error($dbc));
$row1 = mysqli_fetch_array($r1, MYSQLI_ASSOC);
$row2 = mysqli_fetch_array($r2, MYSQLI_ASSOC);
echo $row1[‘aa’]
echo $row2[‘bb’]
im guessing at some kind of case clause but unsure how to do it correctly