选择语言 :

 Module_Database_Result::current

获取当前行数据

null Module_Database_Result::current( )
see
Iterator::current()
File: ./modules/database/result.class.php
public function current()
{
    if ( $this->_current_row !== $this->_internal_row && !$this->seek($this->_current_row) ) return false;

    // Increment internal row for optimization assuming rows are fetched in order
    $this->_internal_row ++;

    $data = $this->fetch_assoc();

    if ( $this->_charset_need_change )
    {
        $this->_change_data_charset( $data );
    }

    if ( $this->_as_object === true )
    {
        # 返回默认对象
        $data = new stdClass($data);
    }
    elseif ( is_string($this->_as_object) )
    {
        # 返回指定对象
        $data = new $this->_as_object( $data );
    }

    return $data;
}