TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-27-2010, 04:06 PM   #1 (permalink)
The Visitor
Newcomer 
 
Join Date: Nov 2010
Location: India
Posts: 1
Thanks: 0
nandananushil1 is on a distinguished road
Default php mysql menu

i have categories, sub-categories in my database from which i wan to make menu. total number of categories including sub-catgeories is 495 and sub-categories go to a depth of level 3.

i want to know which one will be faster and put less load on my server.

1. i use a function to generate menu every time page is loaded, so every time categories table needs to be crawled. right?

2. since i will update categories one in a while, so i use function to write them in a file in <ul><li> manner and use it as menu so that i don't have to use database
nandananushil1 is offline  
Reply With Quote
Old 11-28-2010, 05:09 AM   #2 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by nandananushil1 View Post
i have categories, sub-categories in my database from which i wan to make menu. total number of categories including sub-catgeories is 495 and sub-categories go to a depth of level 3.

i want to know which one will be faster and put less load on my server.

1. i use a function to generate menu every time page is loaded, so every time categories table needs to be crawled. right?

2. since i will update categories one in a while, so i use function to write them in a file in <ul><li> manner and use it as menu so that i don't have to use database
Caching like that will always be faster since it has to make less database calls.
__________________

Village Idiot is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP & MySQL Verticle Collapse menus mombunheng Advanced PHP Programming 7 02-19-2010 05:17 PM
php drop down menu Shiag Absolute Beginners 2 07-23-2009 10:08 AM
Help on PHP MYSQL Forms Input deesudesu Absolute Beginners 1 03-20-2009 10:50 AM
how to call mysql procedures in php??? gptArun Absolute Beginners 7 06-05-2008 08:13 PM
Error in connecting to MySQL via PHP EyeDentify MySQL & Databases 0 01-03-2008 01:06 PM


All times are GMT. The time now is 02:12 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design