Skip to main content

All Questions

0 votes
1 answer
307 views

How to get the last level of elements from tree-like data structure in php?

My recursive function returns all the children of menu but I want to have just the last children of array, here is my code: function test($pid){ $arr = array(); $sql = "SELECT * FROM ...
Dura's user avatar
  • 5
2 votes
1 answer
2k views

Fetching all parents in simple way with PostgreSQL

I have a table with a hierarchical structure: _________ |Plans |_____________________________________________ |-------------------------------------------------------| | id | ...
CodeRows's user avatar
  • 1,033