Jump to content

Need to get random rows from child categories


sjaguar13

Recommended Posts

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?

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.