Is it possible to query the database only once while the page loads in PHP. Somehow store these results and display it to user on subsequent reports. Is there any way to determine if something is changed in the database so that we can connect to DB only then to fetch new/changed results?
Please give me some idea.
Thanks.
Check out MySQL Query Cache.
MySQL will simply return the same resultset stored in memory when there is no change required.
http://dev.mysql.com/tech-resources/articles/mysql-query-cache.html