Niklas Ojala wrote:

Hello

I am kind of new to this news thing, but here goes.

I am looking for a class or some samples that would read a table from mysql
and store it in an array variable, so that it will be avilable to other
parts of the page without having to get it from the database again. So I
would like to only get the table once per page load but I must be able to
filter the table to get the data that I want.


Retrievals are usually fast so you might find that you are saving only a few milliseconds by doing this.
Did you know that most mysql has a 'query cache' where instead of re running the same query over and over it stores a little bit in memory?


The best example of caching data from a DB into files I have seen is in the mediawiki project.

I am looking for some similar code to get me started or other ideas on how
to make less queries to the database.

/Niklas Ojala





--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/         | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to