/**
* @param $data
* @return bool|int
*/
public function membership_role_create($data)
{
$values = array();
foreach ($data as $key => $value) {
if ($key == 'name') {
$values[$key] = MySQL::SQLValue($value);
} else {
$values[$key] = MySQL::SQLValue($value, MySQL::SQLVALUE_NUMBER);
}
}
$table = $this->kga['server_prefix'] . "membershipRoles";
$result = $this->conn->InsertRow($table, $values);
if (!$result) {
$this->logLastError('membership_role_create');
return false;
}
return $this->conn->GetLastInsertID();
}