Nikandlv
-
Posts
3 -
Joined
-
Last visited
Posts posted by Nikandlv
-
-
Well, I suppose it is more efficient to hardcode the title, but it is less flexible and realistically, it the performance doesn't matter.
But instead, why not get all your site information with one query, and then just echo("<h1>$siteStuff[title]</h1>");?
i guess so , that will be a good idea to get the info as an array for all of stuff i want in my page i t will do the request once
thanks for the suggestion
-
Hi ,
Im wondering if is it efficient to do a sql (using pdo) quary for every visitor of website ?
for example
we have a page
and we have a <h1> tag and its how we use it in here
<?php
echo '<h1>';
echo getthewebsitetitlefromdbfunctionlol() ;
echo '</h1>;
?>
and the getthewebsitetitlefromdbfunctionlol() will basically selects the title from db and return it .
so is it efficient to do this for every visitor of the page ?
is it efficient ?
in PHP Coding Help
Posted
then sorry for asking ! i was wondering how it works .
im not that level experienced to know that