You might want to have a look at our EasyMySQLi-Library that provideas an easy access to MySQL-DBs utilizing MySQLi
You can find everything here:
https://git.firesplash.de/open-source-php/EasyMySQLi
(If you want to delete this link okay it's just there to help.)
Basicly it's an extension to mysqli that provides easy access methods like this:
<?php
require_once 'EasyMySQLi.inc.php';
$db = new EasyMySQLi('host', 'user', 'pass', 'DB');
$ary = $db->querySingleRow('SELECT * FROM exampletbl WHERE id > ?', 158);
echo 'Example-Value is'.$ary['val'];
?>