Hi everyone, I am new to PHP and codeigniter...
I have two tables
one stores the name of different id and organization name
second table contains people information with id for the organization they belong to
I want to translate the name of the organization for each person from the organization table matching it on the organization id
I know how to write the query however, I am unable to figure out how to reference the organization id as part of a result set i.e.
$org_ID = $row->org_ID;
$query = $this->db->get_where('organization', array('orgID' => $org_ID); <<<<<< this does not work and I do not know how
foreach ($query->result() as $r) <<<<< reference the $row->org_ID in the query
{?>
<td><?php echo $r->orgName;?></td> <<<<<<<< this is what I ultimately want to name of the organization and not it's
<?php } ?> <<<<<<<< record identifier.
Can anyone show me how to reference the data in the result set in a second query?
I would be so thankful...