Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 333 Bytes

README.md

File metadata and controls

19 lines (15 loc) · 333 Bytes

DBUtil

For MySQLi Database Framework

include_once "DB.php";

$db = new DB([
	'hostname' => 'localhost',
	'username' => 'root',
	'password' => 'youpassword',
	'database' => 'youdatabase'
	]);

$sql = "SELECT id, name FROM user WHERE id = ?";
$id = 2;
$row = $db->query($sql, array($id))->result_array();

print_r($row);