mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
"allow to insert rows with the auto-id specified"
This commit is contained in:
parent
a3a7503c0f
commit
d58ddd9999
@ -489,14 +489,11 @@ class so_sql
|
||||
$data = $keys;
|
||||
$keys = False;
|
||||
}
|
||||
if (!$this->autoinc_id) // always try an insert if we have no autoinc_id, as we dont know if the data exists
|
||||
// always try an insert if we have no autoinc_id, as we dont know if the data exists
|
||||
if (!$this->autoinc_id || !$this->db->update($this->table_name,$data,$keys,__LINE__,__FILE__,$this->app) || !$this->db->affected_rows())
|
||||
{
|
||||
$this->db->insert($this->table_name,$data,$keys,__LINE__,__FILE__,$this->app);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->update($this->table_name,$data,$keys,__LINE__,__FILE__,$this->app);
|
||||
}
|
||||
}
|
||||
$this->db2data();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user