Generate and call database queries before or within html? [closed]


Well, I looked for this question, but I did not find any questions like this about the database queries only for the JavaScript or JQuery code. What is the best practice, call the database queries before starting HTML or inside the body? (I make queries about the php generated by the html, it is better to generate them before starting the label <html> or better within <body> ).

By the way, is it better to call the function to print the code in the desired place or put the query and print directly inside the DIV or the element that is? (In case it is better to call it before, it is better to make the consultations and then in body put the echo or echo put it along with the queries and call from the DIV with a function).

I hope to learn and optimize my website better.

asked by Menzezzz 16.08.2018 в 13:17

0 answers