When I have a situation like this:
$databaseA = new mysqli($host,$user,$pass,\"databaseA\"); $databaseB = new mysqli($host,$user,$pass,\"databaseB\"); >
For every mysqli-object there will be a separate connection.
Try a
SHOW FULL PROCESSLIST;
on your MySQL server during runtime, you'll see two different processes connected from the same host if your example is implemented.