Welcome Guest, Not a member yet? Register   Sign In
Join two tables with two or three same field
#1

[eluser]Anil3a[/eluser]
I am newbie so bear with me. I was trying to join two tables having
Code:
gift_id = transact.id, item_id=item_id and user_id=user_id

Should i code like
Code:
$this->db->select('*');
$this->db->from('gift');

$this->db->join('transact', 'transact.id=gift.gift_id,transact.item_id=gift.item_id, transact.user_id=gift.user_id');

$query = $this->db->get();
return $query->result();

And What is really the Left join does ?


Messages In This Thread
Join two tables with two or three same field - by El Forum - 05-15-2012, 10:14 PM
Join two tables with two or three same field - by El Forum - 05-15-2012, 11:04 PM
Join two tables with two or three same field - by El Forum - 05-17-2012, 02:54 AM
Join two tables with two or three same field - by El Forum - 05-17-2012, 09:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB