|
Posted by Jim Carlock on 01/24/07 16:25
"FFMG" <spambucket@myoddweb.com> wrote:
: In my site I have a config table, (MySQL), with about 30 entries;
: the data is loaded on every single page load. This is not the only
: call to the db, (we do a total of about 8 calls to the db).
:
: As with many configurations settings, once the options are set
: the values will not change much.
Use an include file that holds a function that returns the data inside
an array. This works well for textual and numeric data.
<?php
require("data.php")
?>
<data.php>
function GetMyArray() {
return(array("data1", "data2", 1, 2, 3, 4));
}
</data.php>
Good luck!
--
Jim Carlock
Post replies to the group.
[Back to original message]
|