• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/db/mysqlisqlhelper.php
  • Класс: BitrixMainDBMysqliSqlHelper
  • Вызов: MysqliSqlHelper::forSql
public function forSql($value, $maxLength = 0)
{
	if ($maxLength > 0)
		$value = mb_substr($value, 0, $maxLength);

	$con = $this->connection->getResource();
	/** @var $con mysqli */

	return $con->real_escape_string($value);
}