Consider also the PDO library, it supports more databases: MySQLi is limited to MySQL and his forks, while PDO can query MySQL, Oracle, SQlite, PostgreSQL, MSSQL and others.
That way you can change database without worrying about rewriting all the code with the specific extensions.