sjaguar13 Posted March 1, 2007 Share Posted March 1, 2007 I have a links system that has categories. Each category either has links or more categories. I need to randomly get links to display in the main content area, if the category only contains more categories. The problem is I only want random links from the categories below the current category. If I have: -News --USA ---New York ---California --Canada -Music --Rock ---AC/DC ----Back In Black For news, I could have any link in New York, California, or Canada. USA wouldn't have any links as all those would have to either be in New York or California. Another issue is the depth isn't always known. For news, 1 and 2 levels down contain links. For music, the 3rd level contains the links. Is there a way to get random links from only the categories below? Link to comment https://forums.phpfreaks.com/topic/40650-need-to-get-random-rows-from-child-categories/ Share on other sites More sharing options...
MadTechie Posted March 1, 2007 Share Posted March 1, 2007 how are the categories stored ? database ? Link to comment https://forums.phpfreaks.com/topic/40650-need-to-get-random-rows-from-child-categories/#findComment-196652 Share on other sites More sharing options...
fenway Posted March 1, 2007 Share Posted March 1, 2007 You only want to get the leaf nodes... Link to comment https://forums.phpfreaks.com/topic/40650-need-to-get-random-rows-from-child-categories/#findComment-196873 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.