CI_DB_result::__construct PHP Method

__construct() public method

Constructor
public __construct ( object &$driver_object ) : void
$driver_object object
return void
    public function __construct(&$driver_object)
    {
        $this->conn_id = $driver_object->conn_id;
        $this->result_id = $driver_object->result_id;
    }

Usage Example

 /**
  * Class constructor
  *
  * @param	object	&$driver_object
  * @return	void
  */
 public function __construct(&$driver_object)
 {
     parent::__construct($driver_object);
     // Required, due to mysql_data_seek() causing nightmares
     // with empty result sets
     $this->num_rows = mysql_num_rows($this->result_id);
 }
All Usage Examples Of CI_DB_result::__construct