I have 2 databases on a hosting, with one running a site (BD1), into the other some data (BD2) is being uploaded, which needs to be updated on the site. How do I connect to (BD2) and get data from there? Site on bitrix, I try it like this, but everything is empty, that is, it does not connect to the base. Maybe using php, without the Bitrix API, can this be done somehow?
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");?> <? $DBHost = "localhost"; $DBName = "111"; $DBLogin = "111"; $DBPassword = "111"; if(!($DB->Connect($DBHost, $DBName, $DBLogin, $DBPassword))) { $results = $DB->Query("SELECT `name` FROM `cities`"); var_dump($results); } ?>