コード例 #1
0
    {
        echo $this->my_db;
        //print "-- f**k it --";
        //return ($this->my_db);
        // return "petron_engine";
        //	return("keith");
    }
}
//----------------------------------------------------->
//----------------------------------------------------->
//----------------------------------------------------->
//object initialization
$petron_quaker_tool = new quaker_tool();
//$mydb =  $petron_quaker_tool->my_db();
sleep(3);
$petron_quaker_tool->get_my_db();
//print $mydb;
//connect to db
$mysqli = mysqli_connect("192.168.136.131", "root", "ph1shstix", "petron_engine");
//Evaluate the connection
if (mysqli_connect_errno()) {
    echo mysqli_connect_error();
    exit;
}
//----------------------------------------------------->
//----------------------------------------------------->
//----------------------------------------------------->
//test query-->
$query = "SELECT * from fleet_manager_setting";
if ($result = $mysqli->query($query)) {
    /* fetch associative array */