Re: Nested database loops and completing an unordered list....
| From: | Jim Lucas | Date: | Fri, 02 Mar 2012 16:02:58 +0000 |
| Subject: | Re: Nested database loops and completing an unordered list.... | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316840@lists.php.net to get a copy of this message | ||
On 03/01/2012 06:20 PM, Jay Blanchard wrote:
Doesn't this SQL query return everything that has company_id set to 3 which would it not contain all the data from the other queries combined into one large data set? At this point, I don't believe you have shown your output. Please show the output of your function.[snip] Can you show the output of the function above? [/snip]
0 SELECT DISTINCT-- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/TIER1DATAFROMPOSITION_SETUPWHERECOMPANY_ID= '3' Executives and Management Normally this query alone returns 9 rows of data. Each of these rows should be included in the next query where TIER1DATA = each of the nine in succession 1 SELECT DISTINCTTIER2DATAFROMPOSITION_SETUPWHERECOMPANY_ID= '3' ANDTIER1DATA= 'Executives and Management' Executives and ManagementLeadership 2 SELECT DISTINCTTIER3DATAFROMPOSITION_SETUPWHERECOMPANY_ID= '3' ANDTIER2DATA= 'Executives and ManagementLeadership' Executives and ManagementLeadershipManager 3 SELECT DISTINCTBUSTIER1DATAFROMPOSITION_SETUPWHERECOMPANY_ID= '3' ANDTIER3DATA= 'Executives and ManagementLeadershipManager'Knee4 SELECT DISTINCTBUSTIER2DATAFROMPOSITION_SETUPWHERECOMPANY_ID= '3' ANDBUSTIER1DATA= 'Knee'KneeDIV015 SELECT DISTINCTBUSTIER3DATAFROMPOSITION_SETUPWHERECOMPANY_ID= '3' ANDBUSTIER2DATA= 'KneeDIV01'KneeDIV01DEPT026 SELECT DISTINCTBUSTIER4DATAFROMPOSITION_SETUPWHERECOMPANY_ID= '3' ANDBUSTIER3DATA= 'KneeDIV01DEPT02'KneeDIV01DEPT02GRP047 SELECT DISTINCT `FROMPOSITION_SETUPWHERECOMPANY_ID= '3' ANDBUSTIER4DATA` = 'KneeDIV01DEPT02GRP04' 1054 Unknown column '' in 'field list'