Re: Thinking out loud - a continuation...
| From: | Robert Cummings | Date: | Fri, 23 Mar 2012 20:12:47 +0000 |
| Subject: | Re: Thinking out loud - a continuation... | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-317237@lists.php.net to get a copy of this message | ||
On 12-03-23 03:52 PM, Jay Blanchard wrote:
It's meant to since outside the loop we address tier 1 when we generate the root and first set of parents (These have no parent ID so they are a special case).[snip] SELECT DISTINCT[/snip] I figured out part of the problem - the for loop starts at tier2 instead of tier1TIER3DATAAS id,TIER2DATAAS parentId FROMPOSITION_SETUPWHERECOMPANY_ID= '3' ANDTIER2DATAIN ('Executives and Management','Professionals','Technicians','Craft Workers-Skilled','Operatives','Contractor','Sales Workers','Laborers and Helpers','Admin Support') and it is empty.
Once I made that change I get the following error: Fatal error: Cannot use string offset as an array in /home/orcadept/public_html/poschart/json_chart.php on line 139 Line 139 is $item['children'][$id] =&$child;$item['children'] should be an array, somehow a string has been assigned :/ Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized.