Sorry for my bad English, if u don't understand, i can try to explain better.
I develop a new module for push content into another site. I explain, I have a site that allow me create different contents, I would like push this content to another site (in "/sites/" ). My problem is : we don't know another sites so I do check repertory in my module and save database information. It's OK ! But I don't find function in drupal to implement there DB. I test :
'name' => string 'site_com_corporate' (length=18)
'database' => string 'site_com_corporate_dev' (length=22)
'username' => string 'root' (length=4)
'password' => string '' (length=0)
'host' => string '127.0.0.1' (length=9)
'port' => string '' (length=0)
'driver' => string 'mysql' (length=5)
'prefix' => string '' (length=0)
Database::addConnectionInfo($site['name'], 'default', $site['bdd']);
The connection fail, drupal connect to default.
Thx for u help !