[eluser]Quaotloa[/eluser]
Hi, I have two addresses where I want to get the place in a query..
My query look like this now:
$this->db->from('Customers');
$this->db->where('id', $id);
$this->db->join('Zip_codes', 'Customers.delivery_zip = delivery.zip', 'left outer');
$query = $this->db->get();
But I want to do something like this:
$this->db->from('Customers');
$this->db->where('id', $id);
$this->db->join('Zip_codes', 'Customers.delivery_zip = delivery.zip', 'left outer');
$this->db->join('Zip_codes', 'Customers.invoice_zip = invoice.zip', 'left');
$query = $this->db->get();
But how can i seperate the result?
If I only have one join to the table, I could do something like this;
<?php echo $result->place; ?>
But what do I do when I have two joins for the same table? I need to do something like:
<?php echo $result->delivery.place; ?>
<?php echo $result->invoice.place; ?>
But I can't get it no work?
Regards
Fredrik