[eluser]breastfed[/eluser]
Hello
i have a Problem with a db->join Query.
I have a Table "jobs" and "user_profile".
With this model:
Code:
function getJobs ()
{
$this->db->join('user_profile', 'jobs.author_id = user_profile.user_id');
$this->db->limit(4);
$this->db->order_by('jobs.id','DESC');
#$this->db->where('membership','2');
$this->db->where('status','1');
$query = $this->db->get('jobs');
return $query;
}
It is kind of working but in my viewer:
Code:
$this->table->set_heading('City','Country', 'Company', 'Time');
foreach($display_jobs->result() as $row):
$this->table->add_row(
'<a > id.'">'.$row->placeofwork.'</a>',
'<a > id.'">'.$row->country.'</a>',
'<a > id.'">'.$row->company_name.'</a>',
'<a > id.'">Fulltime</a>'
);
endforeach;
echo $this->table->generate();
behind /detail/ it is posting the id of the user_profile Table and not from jobs.
How can i echo the $row->id of the jobs with the company_name of the user_profile?
Looking for urgent help.
Thanks!