Jump to content

Grouping an Array


wsantos

Recommended Posts

I have data that reflects the stages of the system a connection passes.  Now that stage can be any of the applications present in the system that may have different data.  As an example lets take a single connection.

 

app1|app1data1  -->  app2|app2data1  --> app1|app1data2 --> app3|app3data1 --> app2|app2data2

 

There is no finite number of stages it may go through.  Also there is no definite order what stage will it fork to. 

 

As an example there are 10 total incoming.  Of the 10 incoming 5 went to app1 with data app1data1 then 3 of the 5 went to app2 with data app2data2.  The remaining 2 went to app3 with data app3data1.  The remaining 5 of the original 10 incoming went to app2 with data app2data2 (note this is the 2nd stage of the first 5 which can be the third stage or whatever).

 

Since I could not find a way to group it via mysql I put everything in an array.  I got the total number of incoming and the stage and stage data it terminated.

 

Now my goal is to trace the total incoming and trace which stages it will go through until termination.  Any help is much appreciated.

Link to comment
Share on other sites

|Main|    |lookup_cid|      |path|        |lookup_exten|  |lookup_app|

mid              rid                pid                etc                  etc

uid................uid                appid ...................................appid               

src                cid................cid                etc                  etc

dst                etc              eid .............. eid

etc                etc              appdata

                                        etc

 

The structure seems logical.  However the source of the data is unconventional in a sense that they (the company) may bypass a stage 1 and proceed with stage 2 then go back to stage 1.  I used 'stage' referring to a section of their system and not literally by order.  Thanks BenInBlack...I'll look into this.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.