DJJQ
Založený: 22.07.2009
Príspevky: 2
Zaslal: 2009-07-23 12:20
Návrat hore
Odpovedať s citátom
|
I've been searching around and nowhere is there a simple explanation on how to join a simple column from another table to be shown with the main table.
Main table name: councils
Main table join on: schoolid
Other table: schools
Other table join on: schoolid
column from other table to be shown with main table:
name
How hard can this be, really..
|
doug
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2009-07-25 02:21
Návrat hore
Odpovedať s citátom
|
Use the forum's search feature to locate examples that contain $join_table or related variables named in the following example.
| Kód: |
$join_table = 'contacts'; // alias of the values table
$main_table = 'domain'; // alias of the main table
$join_column = 'display_name';
$join_description = 'display_name';
$main_column = 'owner_id';
$opts['fdd']['owner_id'] = array(
'default' => '0',
'input' => '',
'maxlen' => 5,
'name' => 'Owner Id',
'options' => 'ACPVD',
'required' => false,
'select' => '',
'size|ACP' => 5,
'sqlw' => 'TRIM("$val_as")',
'sort' => true,
'values' => array(
'join' => '$main_table.$main_column = $join_table.$join_column',
'table' => 'contacts',
'column' => 'contact_id',
'description' => array(
'columns' => array($join_description)
)
// , 'filters' => 'category = "Client"'
)
);
|
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|