Format SQL Query Result into web menu

Hicham EL MORSLI 1 Reputation point
2021-05-30T22:23:50.833+00:00

I am trying to build a drill-down menu for my website, where the user will click on a category and it will show the subcategories of that clicked category, there could be n-levels. I am able to write an SQL query which returns the output exactly as I want, but the problem is...I don't want to show the whole menu to the end-user, I would like to open/expand only clicked category.
my Query output is:

1 IPTV
2 Jadoo Tv
3 Shava Tv
4 Java Tv
5 Programming
6 Microsoft
7 Asp.Net
8 PHP
so by default IPTV & Programming Should be displayed, since they are parent, and when I click on IPTV it should open the children of IPTV, like I said there could be n-levels.

I was thinking, I can load the output of query to webpage and then control the menu navigation with css/javascript.

do you guys have any ideas?

Developer technologies C#
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Miguel Escobar 326 Reputation points Volunteer Moderator
    2021-09-06T06:30:45.273+00:00

    hey @Hicham EL MORSLI

    I've modified the tag used in your thread as the original tag was "power-query-online" and the question doesn't appear to be related to the Power Query product. You can learn more about Microsoft Power Query from the link below:
    https://learn.microsoft.com/en-us/power-query/power-query-what-is-power-query

    Feel free to modify the tag again to a topic that suits your question best. I'm not entirely sure what programming language you might be using, so I added dotnet csharp.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.