Welcome Guest, Not a member yet? Register   Sign In
[Solved] Getting one value from row in database
#8

[eluser]mohssenvox[/eluser]
use this in your model:
Code:
$this -> db->select("value");
$this->db->from(‘setting’); // Table Name
$this->db->where(‘group’, ‘config’);
$this->db->where(‘key’, ‘config_meta_title’);
$query=$this->db->get();
return $query->result();
and in your controller you can use this code to get value contet:
Code:
$this->load->model("your model");
$data=$this->your model->your function();
foreach($data as $index)
{
   echo $index->value;//you can access content
}


Messages In This Thread
[Solved] Getting one value from row in database - by El Forum - 06-15-2014, 07:49 AM
[Solved] Getting one value from row in database - by El Forum - 06-15-2014, 10:33 PM
[Solved] Getting one value from row in database - by El Forum - 06-15-2014, 11:07 PM
[Solved] Getting one value from row in database - by El Forum - 06-15-2014, 11:34 PM
[Solved] Getting one value from row in database - by El Forum - 06-16-2014, 12:19 AM
[Solved] Getting one value from row in database - by El Forum - 06-16-2014, 01:03 AM
[Solved] Getting one value from row in database - by El Forum - 06-16-2014, 02:34 AM
[Solved] Getting one value from row in database - by El Forum - 06-16-2014, 03:25 AM
[Solved] Getting one value from row in database - by El Forum - 06-16-2014, 08:35 AM
[Solved] Getting one value from row in database - by El Forum - 06-16-2014, 07:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB