i have witten this php class, but i have problem using it,
<?php
class cs_mysql{
protected $configPath;
protected $db;
function __construct($cP = null){
$this->configPath = $cP;
require $this->configPath;
}
private function connection(){
$db = new mysqli(Config::get('dbHost'),Config::get('dbUser'),Config::get('dbPass'),Config::get('dbName'));
}
public function getRow($table){
$query = 'SELECT * FROM $table ORDER BY `id` DESC';
$sql = $this->db->query($query);
if(!$sql){
echo "FALSE";
}
}
}
?>
i don't know how to run db query : $sql = $this->db->query($query);