1

Im building an application with PHP, similar to any CMS we have(wordpress, joomla), not such big one, but just my custom script to manage some blogging requirements, so what I do is, I do generate complete URL in SEO friendly manner like

www.domain.com/category1/category2/category3/page/

I can do this by joining relations from Page to domain all the way like

page->category3->category2->category1->domain

I did this but I feel i am overloading the server and some how I feel my code is in efficient, in the way, I need to execute 3 queries to get this page hierarchy, for fetching all 3 categories addresses(slugs), so I am looking is there any efficient way to achieve the same in better manner?

Peterson Andrew
  • 243
  • 6
  • 16
  • There are available a previous posting at `SO` like this topic. `NNicols` has explained nicely in his post about this issue, do you have time to read [this post](http://stackoverflow.com/questions/9609976/how-to-implement-hierarchical-cms-sites) –  Feb 03 '14 at 13:00

0 Answers0