Hello
I am loading images from the database by using the following method:
<img src=”showImage.php?id=1″>
showImage.php knows how to take the id of the imge which is passed to it via $_GET, query the database, extract the appropriate image information (content type, and actual image), and display it.
I have an efficiency problem. If I have a page which has 100 images, then I basically call showImage.php 100 times, which results in 100 queries to the database.
I would like to extract all the data I need (for all the 100 images) in a single query (possible) in the page invoking showImage.php, and pass the information to the showImage.php page somehow. Or even better, place that information in a place that will be accessible to showImage.php
This way showImage will not need to query the database.
I cannot rely on session information because one of the system requirements are that the application must be clustered.
please help