$query =mysqli_query($con,"select * from table where countRow>\'0\' and timerRow=\'0\' and userid=\'$userid\' limit 1"); if(mysqli_num_rows($query)>0){