Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  How to display foreign key values

phpMyEdit General     How to display foreign key values
Post new topic   Reply to topic    
 
rmc7777     Joined: 25 Aug 2009   Posts: 1  
Post Posted: 2009-08-25 20:39
Back to top  Reply with quote     

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

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy