Documentation

getSubstrFunction

string public
\Bitrix\Main\DB\SqlHelper::getSubstrFunction(
 string $str,
 integer $from,
 integer $length = null
);

This non-static method returns SQL function for getting part of string.

If length is null or omitted, the substring starting from start until the end of the string will be returned.

$str and $from parameters are SQL unsafe.

Parameters

ParameterDescriptionVersion
$strDatabase field or expression.
$fromStart position.
$lengthMaximum length.

Examples



© «Bitrix24», 2001-2024