Welcome Guest, Not a member yet? Register   Sign In
working with two tables under one function
#4

Thanks for your response it solved one issue but now am stuck on my second step.
how do i get values form the passed array,still new to codeigniter kindly bear with me.my code below
(controller)
function index()
{

$details = $this->user_model->get_user_by_id($this->session->userdata('uid'));

//kama row haina kitu kufanyike nini?------some code
if ($details ){
$data = array('details' => $details);


//Hii code inaload row moja yenye session iko active in both tables ie facility na users

$data['uname'] = $details[0]->name;
$data['uemail'] = $details[0]->email;
$data['ucat'] = $details[0]->category;
$data['fmail'] = $details[0]->emaile;
$data['age'] = $details[0]->age;

$this->load->view('profile_view', $data);

}
else{
$this->load->view('welcome_message.php');
}
Sense & Simplicity
Reply


Messages In This Thread
RE: working with two tables under one function - by frankdmin - 03-28-2017, 02:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB