[eluser]brianatlarge[/eluser]
Basically I'm trying to get my customers contact information and salesmens contact information returned.
I have a customers table that references my contacts table twice. First for the customers contact information (customers.contact_id) and secondly for the salespersons contact information (customers.customer_salesman).
Code:
$this->db->select('*');
$this->db->from('customers');
$this->db->join('contacts', 'contacts.contact_id = customers.contact_id');
$this->db->join('contacts AS salesmen', 'salesmen.contact_id = customers.customer_salesman');
The problem is, my results only show the data from the contacts table for my last join. It won't return the information from when I joined on customers.contact_id. Is there any way to get it to return the results for customers.contact_id and customers.customer_salesman?