I am using the PHP function mysqli_query to run a SELECT query.
mysqli_query
SELECT
What does mysqli_query return if the query runs successfully, but
A Mysqli_query object, than you can use mysqli_num_rows to count the number of rows returned. So:
Mysqli_query
if(mysqli_num_rows($query) > 0 ){ // Do something }