• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/database/structure/closuretree.php
  • Класс: BitrixTasksInternalsDataBaseStructureClosureTree
  • Вызов: ClosureTree::isNodeExist
static function isNodeExist($id)
{
	$pCName = static::getParentNodeColumnName();
	$cName = static::getNodeColumnName();
	$tableName = static::getTableName();

	$connection = MainHttpApplication::getConnection();

	$item = $connection->query("
		select 1
		from
			".$tableName."
		where ".$cName." = '".intval($id)."' and ".$pCName." = '".intval($id)."'
	")->fetch();

	return !!$item;
}