Return to Snippet

Revision: 34138
at October 18, 2010 03:57 by audiopleb


Updated Code
//Model

function name()
{
	$this->db->select('column_name');
	return $this->db->get('db_name');
}

//Controller

$data['row'] = $this->db->name($var)->row();

//view

<?=$row->column_name;?>

Revision: 34137
at October 18, 2010 03:54 by audiopleb


Initial Code
//Model

function name()
{
	$this->db->select('column_name');
	return $this->db->get('db_name');
}

//Controller

$data['row'] = $this->db->name($var)->row();

//view

<?=$row->column_name;?>

Initial URL

                                

Initial Description

                                

Initial Title
Active record query to single row result object

Initial Tags
codeigniter

Initial Language
PHP