mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:04:53 +01:00
fix for mssql problem reported, without SET identity_update <table> ON, mssql refuses to change the identity column (create negative group id). I cant test it, as I have no MsSQL at the moment.
This commit is contained in:
parent
11388cb28d
commit
332b6fabd5
@ -323,6 +323,10 @@
|
||||
|
||||
if ($account_info['account_type'] == 'g' && $id > 0) // create negative id for groups
|
||||
{
|
||||
if ($this->db->Type == 'mssql')
|
||||
{
|
||||
$this->db->query("SET identity_update $this->table ON",__LINE__,__FILE__);
|
||||
}
|
||||
$this->db->update($this->table,array('account_id' => -$id),array('account_id' => $id),__LINE__,__FILE__);
|
||||
return -$id;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user