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

One common pitfall when transitioning from MySQL to MySQLi in PHP scripts is not updating the function calls to use the MySQLi syntax. To solve this issue, make sure to replace all MySQL functions with their MySQLi equivalents. Example: Incorrect: ``` $result = mysql_query($query); ``` Correct: ``` $result = mysqli_query($connection, $query); ```