Hello,

On 09/29/2004 06:04 AM, Niklas Ojala wrote:
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.

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

You may want to look at the this generic data cache class that can cache any type of data in disk files. If you want to cache variables, just use it in conjunctions with serialize and unserialize functions.


The class employs safe locking to prevent that more than one access tries to update the cache file when the cache is generated for the first time or it has expired and leave it corrupted. This is very important, especially for busy sites.

http://www.phpclasses.org/filecache



--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

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



Reply via email to