M
M
mrWan2017-09-16 19:34:53
PHP
mrWan, 2017-09-16 19:34:53

If each time you pull out a multi-level list from the database, then the download speed drops. What way out of the situation would you suggest?

I have a table with products, fields "brand", "model", "type". I am displaying a list of current products. And if every time I get everything from the database, then the download speed drops (I display everything through nested foreach and conditions). What is suitable in my case? Static html will not work because today the product is of this type. there is a brand, a model, but tomorrow it may not be

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Gadzhiev, 2017-09-16
@gds1

And if every time you get everything from the database, then the download speed drops

What does speed drop mean? Are you displaying several million products at the same time? Look at the queries to the database, in normal mode, when choosing from 3 fields, the speed should not decrease.

M
mrWan, 2017-09-16
@mrWan

Can write html menu to a file and include where necessary

foreach 
$menu .= <li>
....тра татата
file_put_contents(.....,$menu, file append)

And always keep track of the relevance of types, brands of models when adding, editing, deleting

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question