Re: PHP Data cache ideas/solutions
| From: | Niklas | Date: | Wed, 29 Sep 2004 16:32:51 +0000 |
| Subject: | Re: PHP Data cache ideas/solutions | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-198205@lists.php.net to get a copy of this message | ||
Thank you for your ideas, this is an example of what I came up with. When
the application is complete I will turn on the query cache in mysql to have
even better performance.
function filter($var)
{
if ($var["active"])
{
return true;
}
}
$link = mysql_pconnect("localhost", "foo", "bar");
mysql_select_db("stuff", $link);
$result = mysql_query("SELECT * FROM table", $link) or die("Error");
$data = array();
while ($row = mysql_fetch_array($result))
$data[] = $row;
$filtered_data = array_filter($data,"filter");
/Niklas Ojala