thomascube
2010-03-02 7c9d922b96f9a88b350d6e07f5bde84ccc40f9b0
program/include/rcube_mdb2.php
@@ -331,10 +331,15 @@
    if (!$this->db_handle || $this->db_mode=='r')
      return FALSE;
    // find sequence name
    if ($table && $this->db_provider == 'pgsql')
      $table = get_sequence_name($table);
    if ($table) {
      if ($this->db_provider == 'pgsql')
        // find sequence name
        $table = get_sequence_name($table);
      else
        // resolve table name
        $table = get_table_name($table);
    }
    $id = $this->db_handle->lastInsertID($table);
    
    return $this->db_handle->isError($id) ? null : $id;