D7 API documentation
What's New
Modules
Main module in old core
addSecondsToDateTime
castToChar
convertFromDb
convertToDb
forSql
formatDate
getAliasLength
getAscendingOrder
getCharToDateFunction
getColumnTypeByField
getConcatFunction
getConverter
getCurrentDateFunction
getCurrentDateTimeFunction
getDateToCharFunction
getDatetimeToDateFunction
getDescendingOrder
getFieldByColumnType
getIsNullFunction
getLeftQuote
getLengthFunction
getQueryDelimiter
getRightQuote
getSubstrFunction
getTopSql
prepareAssignment
prepareInsert
prepareMerge
prepareUpdate
quote
softCastTextToChar
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
Parameter | Description | Version |
---|---|---|
$str | Database field or expression. | |
$from | Start position. | |
$length | Maximum length. |
Examples
© «Bitrix24», 2001-2024
Up