Обсуждение:AddClassProperty
Материал из MajorDoMo инфо
Нет ничего 4 параметром !!!!
/** * Summary of addClassProperty * @param mixed $class_name Class name * @param mixed $property_name Property name * @param mixed $keep_history Flag keep history (default 0) * @return mixed */ function addClassProperty($class_name, $property_name, $keep_history = 0) { $class_id = addClass($class_name); $sqlQuery = "SELECT ID FROM properties WHERE TITLE = '" . DBSafe($property_name) . "' AND OBJECT_ID = 0 AND CLASS_ID = '" . $class_id . "'"; $prop = SQLSelectOne($sqlQuery); if (!$prop['ID']) { $prop = array(); $prop['CLASS_ID'] = $class_id; $prop['TITLE'] = $property_name; $prop['KEEP_HISTORY'] = $keep_history; $prop['OBJECT_ID'] = 0; $prop['ID'] = SQLInsert('properties', $prop); } return $prop['ID']; } Всё от лукавого :))))тест
тест