Bonjour j'ai cette jointure, mais je veux rejoindre un autre Tabel nommé « utilisateurs » et je veux la « profil_billed » ligne, comment puis-je faireCodeIgniter rejoint plusieurs
je veux dire « Où forum_traad.brugernavn = utilisateurs. profil_billed » quelque chose comme ça
function posts($id)
{
$this->db->select('*,forum_traad.indhold as traad_indhold,
forum_kommentare.indhold as kommentare_indhold,
forum_traad.brugernavn as traad_brugernavn,
forum_traad.id as traad_id
');
$this->db->from('forum_traad');
$this->db->join('forum_kommentare', 'forum_kommentare.fk_forum_traad', 'forum_traad.id');
$this->db->where('forum_traad.id', $id);
$query = $this->db->get();
if($query->num_rows > 0)
{
return $query->row();
} else {
return false;
}
}
quelque chose comme ça $ this-> db-> rejoindre ('utilisateurs', 'forum_traad.brugernavn', 'users.username'); – Simon
mais ça ne marche pas et puis-je avoir 2 jointures comme ça? – Simon