quering db for each image
Posted: Fri Jun 03, 2005 5:06 pm
i have an html page with links to images.
the images are located in inaccessable from outside location so for each link on above page some php page is being called that in turn sends the image to browser according to passed image id.
something that bothers me is that each time php page is called, it accesses
database according to image id(which is primary key) to retrive image storage.
(so if i display ,say 20 images on page, the browser will ask 20 times for images and that will demand 20 db queries.)
do you think that these kind of db accesses are bad for the running server?
the images are located in inaccessable from outside location so for each link on above page some php page is being called that in turn sends the image to browser according to passed image id.
Code: Select all
<img src="sendimage.php?imgid=8" />database according to image id(which is primary key) to retrive image storage.
(so if i display ,say 20 images on page, the browser will ask 20 times for images and that will demand 20 db queries.)
do you think that these kind of db accesses are bad for the running server?