I am wondering if someone might be able to spot where I'm going wrong here? I want to return the number of unique values for a column. When I run this query on Phpmyadmin the result is correct, but when I try to do it through PHP I keep getting the result 1.
//Find out number of unique slotids and assign to variable
$q2= "SELECT COUNT( DISTINCT(`slotid`) ) FROM `individualavailability`";
$result2 = mysqli_query ($dbcon, $q2);
$count = mysqli_num_rows ($result2);
echo $count. " slot ids";