Re: Thinking out loud - a continuation...
| From: | Jay Blanchard | Date: | Thu, 22 Mar 2012 19:54:27 +0000 |
| Subject: | Re: Thinking out loud - a continuation... | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-317190@lists.php.net to get a copy of this message | ||
[snip]
> At one point you indicated all the data was coming from one table. Can you send me the table
> fields and indicate which fields are used to determine parent child relationship? Also 2 sample rows
> of data which have a relationship would be helpful.
[/snip]
Columns - tier1, tier2, tier3, tier4 etc. (ends with tier14)
Children of tier1 are tier2 -
select distinct tier2 from table where tier1 = "foo" and company = "1"
select distinct tier2 from table where tier1 = "bar" and company = "1"
etc.
Children of tier2 are tier3, etc.
tier1 tier2 tier3
1, executive, ceo, ceo
1, executive, vp-ops, vp-ops
1, executive, vp-admin, vp-admin mgr
1, executive, vp-admin, vp-admin ops mgr
1, executive, vp-admin, vp-admin mgr
1, executive, vp-admin, vp-admin clerk
1, professional pro-mgr pro-admin
1, professional pro-IT pro-dev
1, professional pro-IT pro-infra
1, professional pro-IT pro-dev
1, technician tech-admin tech-admin mgr
1, technician tech-ops tech-ops mgr
Thanks for all of your help. I know I am being a PITA.