Kimai_Database_Mysql::group_create PHP Method

group_create() public method

Adds a new group
Author: th
public group_create ( array $data ) : integer
$data array name and other data of the new group
return integer the groupID of the new group, false on failure
    public function group_create($data)
    {
        $data = $this->clean_data($data);
        $values['name'] = MySQL::SQLValue($data['name']);
        $table = $this->kga['server_prefix'] . "groups";
        $result = $this->conn->InsertRow($table, $values);
        if (!$result) {
            $this->logLastError('group_create');
            return false;
        } else {
            return $this->conn->GetLastInsertID();
        }
    }
Kimai_Database_Mysql