public function getCurrentIndex($idfield = 'id')
    {
        // TODO: think more to optimize this method
        if (is_array($this->data)) {
            return array_search(current($this->data), $this->data);
        }

        // else it is dsql dataset...
        return $this->current_row[$idfield];
    }
public function getCurrentIndex($idfield = 'id')
    {
        // TODO: think more to optimize this method
        if (is_array($this->data)) {
            return array_search(current($this->data), $this->data);
        }

        // else it is dsql dataset...
        return $this->current_row[$idfield];
    }
public function getCurrentIndex ( $ idfield = 'id' ) { // TODO: think more to optimize this method if ( is_array ( $ this -> data ) ) { return array_search ( current ( $ this -> data ) , $ this -> data ) ; } // else it is dsql dataset... return $ this -> current_row [ $ idfield ] ; }
Returns ID of record.

@param string $idfield ID field name

@return mixed
Returns ID of record .