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

phpMyEdit General     Joining 3 tables
Odoslať novú tému   Odpovedať na tému    
 
dazil     Založený: 22.12.2007   Príspevky: 3  
Príspevok Zaslal: 2008-01-07 21:41
Návrat hore  Odpovedať s citátom     

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

 
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