Hi Vas
I’ve modified your join function so I can related tables using more than one column.
You mean have two foreign keys in table 1 that both relate to table 2? Sounds like a curious design, but in any case you could use aliases:
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
April 10, 2010 6:41pm
Subscribe [14]#61 / Dec 02, 2010 10:27am
Hi Vas
I’ve modified your join function so I can related tables using more than one column.
You mean have two foreign keys in table 1 that both relate to table 2? Sounds like a curious design, but in any case you could use aliases:
#62 / Apr 04, 2013 7:41am
How does the data array look like in this….......
// insert a new record
$this->office->insert($data);
// update a record
$this->office->update($data, $office_id);How would i pass data that cross between tables…........ is this correct ?
$data = array (
'persons' => array(
'firstname' => 'john',
'lastname' => 'doe',
'othernames' => 'Kabiri',
'email' => '[email protected]',
'students' => array(
'intake' => 'BCA-2009',
'admission_number' => 'BCA-001-029',
'date_of_admission' => strtotime('now'),
'former_school' => 'Former School',
)
)
);