Hi,
Suppose we have two MySQL tables as follows:
TableX
tableXid (PK)
tableYid (FK)
TableY
tableYid (PK)
somevalue
In other works, there is a foreign key constraint between the tables. When we display records in TableX, we would like the actual values in column "TableY:somevalue" to appear in the "TableX:tableYid" field.
In phpMyEdit we have a field something like this:
$opts['fdd']['tableYid'] = array(
'name' => 'somename',
'select' => 'T',
'maxlen' => 11,
'values' => array(
'table' => 'TableY',
'column' => 'somevalue'
),
);
When we display records in TableX using this example, it shows "TableY:tableYid" (the PK in TableY) instead of the actual value "TableY:somevalue". In other words, it seems as though phpMyEdit does not recognize the foreign key relationship and just prints the primary key field from TableY. Is there a fix for this? (Hope I explained this OK, it's hard to describe in email format).
|