aebstract Posted July 10, 2009 Share Posted July 10, 2009 I'm needing to know what would be quicker in rendering and displaying. I'm going to have a list of about 45 items under 6 categories. I'm wanting to put it all in a database and loop through it with php, but if that would end up slowing down the site I want to look at something else. Typing it all in to html, would that be faster? Thanks for any info. Quote Link to comment Share on other sites More sharing options...
niranjnn01 Posted July 10, 2009 Share Posted July 10, 2009 friend... give more details, so that someone reading ur question will feel like answering... what are these items? there size ? 45 * 6 = 270 records ... wont slow down sql in normal case.. is my suggestion Quote Link to comment Share on other sites More sharing options...
aebstract Posted July 10, 2009 Author Share Posted July 10, 2009 It's just text, which I am going to use to generate a menu tree. Category/name is basically all that will be used and maybe the unique ID. Quote Link to comment Share on other sites More sharing options...
niranjnn01 Posted July 10, 2009 Share Posted July 10, 2009 then it wont be a problem.. website tables usually have 10,000+ records to handle... and it takes only milli seconds to get them... php too, wont get slow in processing them. Quote Link to comment Share on other sites More sharing options...
Maq Posted July 10, 2009 Share Posted July 10, 2009 I'm needing to know what would be quicker in rendering and displaying. I'm going to have a list of about 45 items under 6 categories. I'm wanting to put it all in a database and loop through it with php, but if that would end up slowing down the site I want to look at something else. Typing it all in to html, would that be faster? Thanks for any info. Of course hard-coding the items in HTML would be faster. You wouldn't have to connect to the database and extract the data. But to tell you the truth, with that many items you won't notice a difference. Besides if you decide to add, rearrange, extrapolate statistics, implement pagination, the list goes on and on... you would definitely want to store these values in the database. Quote Link to comment Share on other sites More sharing options...
aebstract Posted July 10, 2009 Author Share Posted July 10, 2009 Appreciate it, guys.. gonna get all the information stored now. Quote Link to comment Share on other sites More sharing options...
milesap Posted July 10, 2009 Share Posted July 10, 2009 If you can, enter all the items in plain HTML. This would be the most efficient since you are not creating a MySQL connection, nor need to do looping. However, if you feel that adding them to a database is the best option for your project, then I recommend using Ajax along with PHP (only fetch items from server when someone clicks on a category). Quote Link to comment Share on other sites More sharing options...
Maq Posted July 10, 2009 Share Posted July 10, 2009 If you can, enter all the items in plain HTML. This would be the most efficient since you are not creating a MySQL connection, nor need to do looping. However, if you feel that adding them to a database is the best option for your project, then I recommend using Ajax along with PHP (only fetch items from server when someone clicks on a category). That's a lot of speculation and regurgitation from the previous replies. The answer is to store them in a database and depending on his application he can extract and display the data however he needs or wants to. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.