Note that you could just use the PDO extension, as it supports many database engines including MySQL. (And I personally find PDO nicer to use than MySQLi 🙂 )
pbismad $statement = $db->mysqli_prepare($query);
If $db
is a MySQLi object, then it would just be:
$statement = $db->prepare($query);
If you're not electing to use OOP style, then it would be:
$statement = mysqli_prepare($db, $query);