2 Replies Latest reply on Apr 4, 2008 2:22 PM by tajjyarden

    Need help with loading MySQL results into a query

      Hello, I need some help figuring out why my tree component isn't being populated with my MySQL results.

      I have a table of categories:
      ParentID - CategoryID - Name

      Every top-level category has a ParentID of 0 (zero). I'm using php and a recursive function to build an array of nested results, then passing those results back to Flex, making those results a new ArrayCollection, then assigning that to the dataProvider of the tree.

      Result: my tree component is blank

      Suspicion: it has to be a way with how my array is being formed in PHP. If I play around with how it is formed I can get some odd results in the tree, so I know it's not a problem with the data being passed back to Flex.

      I am attaching the PHP code used to form the array, and the output of the array being created