MultiDimensional Array Count

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • claudfs
    New Member
    • Oct 2007
    • 3

    #1

    MultiDimensional Array Count

    This is how my db structure looks, i have around 350 rows like this one below each with a different number of comment_list and likes from friends.


    All i want is a query that counts how many times each variable comes up in the db.

    For example if we ran the query in this script we would get:

    1.) 65653171 (3 Times)
    2.) 67418530 (1 Time )

    etc...

    Any Ideas???


    Code:
     [0] => Array
    
                    (
                        [viewer_id] => 65653171
                        [source_id] => 65653171
                        [actor_id] => 65653171
                        [comments] => Array
    
                            (
    
                                [comment_list] => Array
                                    (
                                        [0] => Array
                                            (
                                                [fromid] => 67418530
                                            )
                                        [1] => Array
                                            (
                                                [fromid] => 108832181
                                            )
                                    )
                            )
                            
                        [likes] => Array
                           
                           (
                                [friends] => Array
                                (
                                    [0] => 58579401
                                    [1] => 55125266
                                    [2] => 57449386
                                    [3] => 60906602
                                    )
                                )
                            )
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    Any Ideas
    Not really,I don't understand. Maybe the bold text is is too distracting.
    This is how my db structure looks
    You have posted a 2d array
    All i want is a query that counts how many times each variable comes up in the db.
    Where are the variables? And why would you want to count variables?

    Comment

    Working...