What are common pitfalls when transitioning from MySQL to MySQLi in PHP code?

One common pitfall when transitioning from MySQL to MySQLi in PHP code is not updating the database connection and query functions to use MySQLi syntax. To solve this, you need to update your connection code to use MySQLi functions like `mysqli_connect()` and `mysqli_query()` instead of `mysql_connect()` and `mysql_query()`.

// Before transitioning to MySQLi
$conn = mysql_connect($servername, $username, $password);
$result = mysql_query("SELECT * FROM table");

// After transitioning to MySQLi
$conn = mysqli_connect($servername, $username, $password);
$result = mysqli_query($conn, "SELECT * FROM table");