My following code is working on my local host server. when I host it to actual server the query is not working though connection was established. 
output was 
"result problem"
<?php
include_once 'db_connect.php'; 
class test{
    public function test1(){
        $db_connect = new db_connect();
        $con = $db_connect->connect();
        if(!$con){
            echo "connection fail";
        }else{
            $sql = "select * from tbl_admin where name='abc' ";
            $query = mysqli_query($con,$sql);
            if(!$query){
                    echo "result problem";
                }else{
                        $result = mysqli_fetch_array($query);
                        echo $result['ad_tp'];
                    }
        }
    }
}
$t = new test();
$t->test1();
 
     
     
     
    