I have a simple doubt, its bad way creates a navbar menu from mysql?
100 users = 100 queries, 1000 users = 1000 queries.
What's its the best way?
I never worked with cache, maybe this is the way? Please guide me in the best way.
I have a simple doubt, its bad way creates a navbar menu from mysql?
100 users = 100 queries, 1000 users = 1000 queries.
What's its the best way?
I never worked with cache, maybe this is the way? Please guide me in the best way.
It depends on what you need to do. Like Mark Barker said in the comments, if you have a custom navigation bar per user, then you obviously will use the database. MySQL is totally built to handle your queries and on most setups, small queries like this get tossed into Qcache (cached).
I personally never feel like HTML should be stored in MySQL, and if that is what you want to do, it just seems sloppy to me. HTML should be in a file.
1000 queries is totally acceptable for MySQL. It is perfect for these small queries.