changed last_insert_id() to get_last_insert_id($table,$field)

This commit is contained in:
Ralf Becker 2002-02-18 13:51:04 +00:00
parent 002545067e
commit b7418f98ba

View File

@ -302,7 +302,7 @@ class so_sql
$this->db->query($sql = "INSERT INTO $this->table_name ($cols) VALUES ($vals)",__LINE__,__FILE__);
if ($this->autoinc_id)
$this->data[$this->db_key_cols[$this->autoinc_id]] = $this->db->last_insert_id();
$this->data[$this->db_key_cols[$this->autoinc_id]] = $this->db->get_last_insert_id($this->table_name,$this->autoinc_id);
}
else //update existing row, preserv other cols not used here
{