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  »  Joining 3 tables

phpMyEdit General     Joining 3 tables
Post new topic   Reply to topic    
 
dazil     Joined: 22 Dec 2007   Posts: 3  
Post Posted: 2008-01-07 21:41
Back to top  Reply with quote     

Hi everyone,

(I had previously posted this in another section of the forum; perhaps this is the correct venue for me to ask the question)

First of all, hats off to the development team. PHPMyEdit has saved me many hours of time and effort over the past few months, and I have recommended PHPMyEdit to several friends and colleagues since discovering it.

I have looked all over the forum for an answer to a problem I'm having.

I have 3 tables:

tblproducts
* id
* name
* description
* subcategory_id

tblsubcategories
* id
* category_id
* subcategory_desc

tblcategories
* id
* category_desc

I have a PHPMyEdit page which is used to edit records in tblproducts. I am able to successfully display the verbose subcategory name in the summary page, and am able to create a subcategory select list in the edit page, using syntax such as:

$opts['fdd']['subcategory_id']['values']['table']='tblsubcategories';
$opts['fdd']['subcategory_id']['values']['column']='id';
$opts['fdd']['subcategory_id']['values']['description'] = 'subcategory_desc';

Works like a charm so far.

I want to be able to display the verbose category in the summary, alongside the subcategory, and in the select list on the edit page (Eg. "TVs - Plasma" is a category-subcategory example).

Essentially, I need to display category_desc beside subcategory_desc, but of course the only field edited/inserted into tblproducts would be subcategory_id.

I have considered reorganizing the website which uses the data to allow subcategory_id and category_id to both be stored in the products table, however that seems redundant.

Your help is greatly appreciated.

Thanks,

dave

 
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