You could use two different database handles.
As a general rule mixing MySQL and MySQLi in the same code is a bad idea and the MySQL code will probably get deprecated in a few years.
1
solved Is it Possible to have two database connection in a single page in php? [closed]