Simultaneously, of course. If you are using the MySQL API, save the connection id resource returned by mysql_connect(). If you are using the MySQLi API or PDO extension, then the mysqli and PDO objects returned respectively represent the requested connection.