Documentation

getSlaveConnection

\Bitrix\Main\DB\Connection|null public
\Bitrix\Main\Data\ConnectionPool::getSlaveConnection(
 string $sql
);

This non-static method returns slave connection. Returns null when query must be sent only to the master.

Parameters

ParameterDescriptionVersion
$sqlSQL string. Only SELECT will be sent to slave.

Examples



© «Bitrix24», 2001-2024