[eluser]Unknown[/eluser]
Hello there, rather new to CI, and have been trying to join/call information from another table to another.
The table that the information is in is called users of which we would like to pull out the username and email rows, and put them into a table called newsfeed which is called multiple times in my model/controller.
We would like to be able to call/associate the username and email of the users table with the newsfeed table.
Currently our model file for the try at joining the tables is:
Model file:
Code:
function join_data()
{
$this->db->select('username,
email');
$this->db->from('users');
$this->db->join('newsfeed', 'username= author_id');
$q = $this->db->get();
}
Don't have a strong grasp on what the controller or view call should be as most tutorials i've tried on this manner did not work well for me.
If you need any additional information I'll try to provide what I can.
Any help would be greatly appreciated!
Cheers,
Whey.