04-03-2017, 05:10 AM
hi all,
in my controller is it possible to merge $this->data[ 'user' ] =model(get some data) returns an array.
basic model function below
how can i merge some more data from different table to th $this->data[ 'user' ] without deleting previously added data.
hope its clear.
i know i can change the 'user' but id have to change all my helpers and views.
for the moment im using joins but id like to avoid this (could move on later to nosql or something like that where joins are not relevent.)
thanks alot
in my controller is it possible to merge $this->data[ 'user' ] =model(get some data) returns an array.
basic model function below
Code:
function get_recovery_email()
{
$user_id = $this->auth->get_user_id();
$this->db->select(
'user_recovery.urec_uacc_fk,
user_recovery.urec_email');
$this->db->from('user_recovery');
$this->db->where('urec_uacc_fk', $user_id);
$result = $this->db->get();
if ($result->num_rows() > 0):
return $result->first_row();
else:
return false;
endif;
}
how can i merge some more data from different table to th $this->data[ 'user' ] without deleting previously added data.
hope its clear.
i know i can change the 'user' but id have to change all my helpers and views.
for the moment im using joins but id like to avoid this (could move on later to nosql or something like that where joins are not relevent.)
thanks alot