| Index
» Projekty
» phpMyEdit
» Fórum
» Nested Table Lookup |
 |
keford
Založený: 17.06.2007
Príspevky: 1
Zaslal: 2007-06-17 00:50
Návrat hore
Odpovedať s citátom
|
Be warned, I'm working on a customer site which is stuck on PHP 4.0.6 and phpMyEdit v 1.121 dated 2004/01/26.
I thought this was working at one time, but it isn't now and maybe never was. I'm working in a table that has a Lot ID. I want to lookup that Lot in the lots table and concatenate some columns. One of the columns is a Community ID, which I would like to further lookup in the communities table. My problem is the second table lookup is not happening, all I get is the community ID.
$opts['fdd']['lot'] = array(
'name' => 'Location',
'required' => true,
'sort' => true,
'values' => array(
'table' => 'lots',
'column' => 'id',
'description' => array(
'columns' => array('community', 'number', 'location', 'address', 'city'),
'divs' => array(' - Lot ', ', ', ' - (', ', ', ')'),
'values' => array(
'community' => array (
'table' => 'communities',
'column' => 'id',
'description' => 'name')
))));
For those that like SQL better, here is what I want:
SELECT l.*, c.name FROM lots l, communities c WHERE l.id=table.lotid AND c.id=l.communityid;
Any ideas?
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|