Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 18. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  How to display foreign key values

phpMyEdit General     How to display foreign key values
Odoslať novú tému   Odpovedať na tému    
 
rmc7777     Založený: 25.08.2009   Príspevky: 1  
Príspevok Zaslal: 2009-08-25 20:39
Návrat hore  Odpovedať s citátom     

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).

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov