public function insert_id() {

        // if no active connection exists, return false
        if (!$this->_connected()) return false;

        // if a query was run before, return the AUTO_INCREMENT value
        if (isset($this->last_result) && $this->last_result !== false) return mysqli_insert_id($this->connection);

        // if no query was run before
        // save debug information
        return $this->_log('errors', array(

            'message'   => $this->language['not_a_valid_resource'],

        ));

    }
public function insert_id() {

        // if no active connection exists, return false
        if (!$this->_connected()) return false;

        // if a query was run before, return the AUTO_INCREMENT value
        if (isset($this->last_result) && $this->last_result !== false) return mysqli_insert_id($this->connection);

        // if no query was run before
        // save debug information
        return $this->_log('errors', array(

            'message'   => $this->language['not_a_valid_resource'],

        ));

    }
public function insert_id ( ) { // if no active connection exists, return false if ( ! $ this -> _connected ( ) ) return false ; // if a query was run before, return the AUTO_INCREMENT value if ( isset ( $ this -> last_result ) && $ this -> last_result !== false ) return mysqli_insert_id ( $ this -> connection ) ; // if no query was run before // save debug information return $ this -> _log ( 'errors' , array ( 'message' => $ this -> language [ 'not_a_valid_resource' ] , ) ) ; }
Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.

@since  1.0.4

@return mixed   The ID generated for an AUTO_INCREMENT column by the previous INSERT query on success,
'0' if the previous query does not generate an AUTO_INCREMENT value, or FALSE if there was
no MySQL connection.
Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query .