$total_numMIN = mysqli_query($con,"SELECT MIN(id) FROM view_rating");
$total_numMAX = mysqli_query($con,"SELECT MAX(id) FROM view_rating");
$random_no = mt_rand($total_numMIN, $total_numMAX);
print $random_no;
I'm trying to get a single number randomly generated from the smallest and largest numbers in my database. Right now the error I'm getting is
Warning: mt_rand() expects parameter 1 to be integer, object given in
I'm just not exactly sure why the results of the queries aren't integers