• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/database/helper/common.php
  • Класс: BitrixTasksInternalsDataBaseHelperCommon
  • Вызов: Common::getDataTypeSql
static function getDataTypeSql($type, $len = 0)
{
	if($type == 'int')
	{
		return $len == 3 ? 'tinyint' : 'int';
	}

	if($type == 'varchar')
	{
		return 'varchar('.(intval($len) ? intval($len) : '1').')';
	}

	if($type == 'char')
	{
		return 'char('.(intval($len) ? intval($len) : '1').')';
	}

	if($type == 'text')
	{
		return 'text';
	}

	if($type == 'datetime')
	{
		return 'datetime';
	}

	return '';
}