i want to store the results of an SQL COUNT in a variable, then divise them, however i'm presented with the error:
Notice: Object of class mysqli_result could not be converted to int in ----
$countrows = 'SELECT count(*) AS NumRows FROM time_slots';
$countresult = $db->query($countrows);
$something = $countresult/3 ;
echo $something;
I used echo
to display the result while testing...
How do i fix this?