I’m building an analytics chart where I need to display the number of visits for each day, for the past 30 days. I’ve tried using the loop below, but it fails to pull certain data and drastically slows down page load time, due to 30 queries being sent in one request. Are there any better ways to get this data
Tag: recursive-query
Fetching all parents in simple way with PostgreSQL
I have a table with a hierarchical structure: I want to list all parents of the plan name Paints, so I can build a breadcrumb to navigate back. Using id = 6 I like to get: I’m using postgresql with PHP, and thinking of efficient way to fetch all the parents as simple as possible. Answer Use recursive with query: