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:
Ralf Becker 2005-12-01 21:01:06 +00:00
parent 11388cb28d
commit 332b6fabd5

View File

@ -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;
}