[PHP] PHP Data cache ideas/solutions

2004-09-29 Thread Niklas Ojala
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

Re: [PHP] PHP Data cache ideas/solutions

2004-09-29 Thread Nick Wilson
* and then Niklas Ojala declared 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

Re: [PHP] PHP Data cache ideas/solutions

2004-09-29 Thread raditha dissanayake
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

RE: [PHP] PHP Data cache ideas/solutions

2004-09-29 Thread Graham Cossey
value for $x and then: $name3 = $user_array[$x]; ? HTH Graham -Original Message- From: Niklas Ojala [mailto:[EMAIL PROTECTED] Sent: 29 September 2004 10:04 To: [EMAIL PROTECTED] Subject: [PHP] PHP Data cache ideas/solutions Hello I am kind of new to this news thing, but here goes

Re: [PHP] PHP Data cache ideas/solutions

2004-09-29 Thread Matthew Fonda
You could do something like: $result = mysql_query(SELECT * FROM whatever, $link); while ($topic = mysql_fetch_assoc($result)) { $all[] = $topic; } The array $all will contain all of the things fetched. On Wed, 2004-09-29 at 02:04, Niklas Ojala wrote: Hello I am kind of new to this

Re: [PHP] PHP Data cache ideas/solutions

2004-09-29 Thread Niklas
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,