In the context of PHP programming, what are the benefits and drawbacks of using object-oriented database query methods like $db->query() compared to procedural mysqli_query()?

When using object-oriented database query methods like $db->query() in PHP, the code tends to be more organized and easier to maintain due to the encapsulation of database operations within the database object. This approach also allows for better error handling and parameter binding. However, procedural mysqli_query() functions may be simpler and more familiar to developers who are used to procedural programming styles.

// Using object-oriented database query method
$db = new mysqli($host, $username, $password, $database);
$result = $db->query("SELECT * FROM table");

// Using procedural mysqli_query()
$db = mysqli_connect($host, $username, $password, $database);
$result = mysqli_query($db, "SELECT * FROM table");