php - How to get value from mysqli_query -


i using mysqli_query

select count( statid ) device_realtime_stats 

in statement, in db returns value ex:3

i want integer in php. giving this

$rows_count = mysqli_query($con, " select count( statid ) device_realtime_stats "); 

but not returns integer, how convert. want integer value in php

you can count

// return mysqli statement not integer $rows_count = mysqli_query($con, " select count( statid ) count device_realtime_stats ");  $count = mysqli_fetch_object($rows_count)->count; // return count want 

Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -