My usual approach to a problem like this to to includes a parent column in
the table
ID (int pk)
Parent ( default null ) // no parent
Item
Itemtype
[etc]
Parent will then hold either a null if a top level item, or a structured path
( 1/10/24 ) that notes the parents of the item all
On 03/01/2012 06:20 PM, Jay Blanchard wrote:
[snip]
Can you show the output of the function above?
[/snip]
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,
On Fri, Mar 2, 2012 at 7:43 AM, Jay Blanchard
jay.blanch...@sigmaphinothing.org wrote:
My usual approach to a problem like this to to includes a parent column in
the table
ID (int pk)
Parent ( default null ) // no parent
Item
Itemtype
[etc]
Parent will then hold either a null if a top
[snip]
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?
[/snip]
I could do that, I can return one large dataset for all of the columns
shown in the tiers array. I have to
[snip] ...stuff ... [/snip]
A thought occurred to me - I need to call the function at the end of the
while loop and then again with different criteria after the while loop?
I'll have to test that later today.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On 03/02/2012 08:27 AM, Jay Blanchard wrote:
[snip]
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?
[/snip]
I could do that, I can return one large dataset for all of the
[snip]
I'm not saying you should get rid of the recursive function calls, but
rather, why not pull all your data in one SQL call, then use recursive
functions on the returned array of data. It will save a little time by not
hitting the DB on each function call too.
[/snip]
I'll just need
Good morning PHP groupies!
I am working on this tool that will ultimately display a collapsible org
chart. The org chart is based on a nested unordered list and that is the
heart of my question.
The NUL(nested unordered list) is based on a set of database queries -
sometimes as many as 14
I don't how how you keep your data in your database but there is no need to
issues that many queries to retrieve your data. From what I understand the
data you want to display is hierarchical. Here's an article that will
hopefully point you to a solution (there are more out there, some better
than
And see also this, which focuses only on the database part of the problem:
http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/
On Thu, Mar 1, 2012 at 5:08 PM, FeIn aci...@gmail.com wrote:
I don't how how you keep your data in your database but there is no need
to issues that
On Thu, Mar 1, 2012 at 6:29 AM, Jay Blanchard
jay.blanch...@sigmaphinothing.org wrote:
Good morning PHP groupies!
I am working on this tool that will ultimately display a collapsible org
chart. The org chart is based on a nested unordered list and that is the
heart of my question.
The
Thanks FeIn, I'll give these articles and methods a look this afternoon.
I'm sure that it will lead to more questions, so I'll be back.
On 3/1/2012 9:16 AM, FeIn wrote:
And see also this, which focuses only on the database part of the
problem:
On 3/1/2012 9:59 AM, Jay Blanchard wrote:
Thanks FeIn, I'll give these articles and methods a look this
afternoon. I'm sure that it will lead to more questions, so I'll be back.
I also forgot to say that I cannot modify the database structure - the
client is very strict about that. But it
[snip]…stuff…[/snip]
I am getting close, but I am also getting frustrated. I probably need to walk
away for a bit.
I have an array of tiers….
Array
(
[0] = TIER1DATA
[1] = TIER2DATA
[2] = TIER3DATA
[3] = BUSTIER1DATA
[4] = BUSTIER2DATA
[5] = BUSTIER3DATA
[6] =
On Mar 1, 2012, at 6:36 PM, Jay Blanchard wrote:
[snip]…stuff…[/snip]
I am getting close, but I am also getting frustrated. I probably need to walk
away for a bit.
I have an array of tiers….
Array
(
[0] = TIER1DATA
[1] = TIER2DATA
[2] = TIER3DATA
[3] = BUSTIER1DATA
On 03/01/2012 04:39 PM, Jay Blanchard wrote:
On Mar 1, 2012, at 6:36 PM, Jay Blanchard wrote:
[snip]…stuff…[/snip]
I am getting close, but I am also getting frustrated. I probably need to walk
away for a bit.
I have an array of tiers….
Array
(
[0] = TIER1DATA
[1] = TIER2DATA
On Thu, Mar 1, 2012 at 4:36 PM, Jay Blanchard
jay.blanch...@sigmaphinothing.org wrote:
[snip]…stuff…[/snip]
I am getting close, but I am also getting frustrated. I probably need to walk
away for a bit.
I have an array of tiers….
Array
(
[0] = TIER1DATA
[1] = TIER2DATA
[2] =
On Mar 1, 2012, at 7:45 PM, Jim Lucas wrote:
On 03/01/2012 04:39 PM, Jay Blanchard wrote:
On Mar 1, 2012, at 6:36 PM, Jay Blanchard wrote:
[snip]…stuff…[/snip]
I am getting close, but I am also getting frustrated. I probably need to
walk away for a bit.
I have an array of tiers….
[snip]
Can you show the output of the function above?
[/snip]
0
SELECT DISTINCT `TIER1DATA` FROM `POSITION_SETUP` WHERE `COMPANY_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 =
On 2012-03-01, at 9:20 PM, Jay Blanchard jay.blanch...@sigmaphinothing.org
wrote:
[snip]
Can you show the output of the function above?
[/snip]
0
SELECT DISTINCT `TIER1DATA` FROM `POSITION_SETUP` WHERE `COMPANY_ID` = '3'
Executives and Management
Normally this query alone returns 9
20 matches
Mail list logo