RE: [PHP-DB] HEAP table

2003-07-09 Thread Terry Riley
Thanks, Daevid

I'll probably use something with session variables. 

However, what I wish is that there was some kind of application-wide 
variables, as can be set in ColdFusion, that could track this. I cannot 
find any means to create such variables in PHP. 

Anyone got any ideas on those lines?

Cheers
Terry

--Original Message-  

 Or instead of creating a table and tying up one more mysql thread, just 
 save
 the timestamp in a file. This could be as simple as that, you could use 
 XML,
 you could use INI parser, you could use any number of things. Also, if 
 the
 HEAP is created per session, then just store that timestamp in a 
 session
 variable and avoid any disk i/o that way.
 
  -Original Message-
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, July 08, 2003 9:24 AM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: RE: [PHP-DB] HEAP table
  
  
   Create a create_date table with one record, one or two 
  fields, and put the
  last refreshed time/date in it. If that's expired, refresh
  
  
  Gary Every
  Sr. UNIX Administrator
  Ingram Entertainment
  (615) 287-4876
  Pay It Forward
  mailto:[EMAIL PROTECTED]
  http://accessingram.com
  
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, July 08, 2003 10:52 AM
   To: [EMAIL PROTECTED]
   Subject: [PHP-DB] HEAP table
   
   
   I have a query that I would have liked to cache, but as it uses 
   UNIX_TIMESTAMP and has a user variable in it, where cacheing 
   won't work, I 
   looked around for another way to do it (it is used to create 
   a smallish  
   50 records table on each web page, so any speed increase is 
   worthwhile).
   
   I decided to go for the creation of a HEAP table, so that 
   anyone accessing 
   the site would automatically access it. The existence of 
  the table is 
   tested for before initial creation by running a select 
  against it and 
   testing the $result variable.
   
   This works, as far as it goes, but it will require occasional 
   updating. 
   And that's where I've come unstuck. How can I test for the 
   time/date of 
   the HEAP table's creation? If I can find that, then I can set 
   a seconds 
   value past which it should be dropped and recreated.
   
   Any ideas?
   
   Using MySQL 5.0.13, php 4.3.2 (on Windows XP), Apache 1.3 
   whatever. This 
   also has to work on the website proper, using 5.0.13/4.3.1 and IIS5.
   
   Terry Riley


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



Re: RE: [PHP-DB] HEAP table

2003-07-09 Thread Terry Riley
Brandy - that's two messages in this thread from you with no content!

Terry

--Original Message-  


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



RE: [PHP-DB] HEAP table

2003-07-09 Thread Terry Riley
Good idea, Ben. I'll remember that when I can afford to have hosting on a 
non-shared server :-) , but can't use it at the moment.

Cheers
Terry

--Original Message-  

 You could have a php file set variables or an array called
 $GLOBAL[some_global_variable], go into the php.ini and set auto_prepend
 to this file. So EVERY php script that is called will first load this
 file.
 
 Ben
 
 -Original Message-
 From: Terry Riley [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, July 09, 2003 4:08 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] HEAP table
 
 
 Thanks, Daevid
 
 I'll probably use something with session variables. 
 
 However, what I wish is that there was some kind of application-wide 
 variables, as can be set in ColdFusion, that could track this. I cannot 
 find any means to create such variables in PHP. 
 
 Anyone got any ideas on those lines?
 
 Cheers
 Terry
 
 --Original Message-  
 
  Or instead of creating a table and tying up one more mysql thread, 
  just
  save
  the timestamp in a file. This could be as simple as that, you could
 use 
  XML,
  you could use INI parser, you could use any number of things. Also, if
 
  the
  HEAP is created per session, then just store that timestamp in a 
  session
  variable and avoid any disk i/o that way.
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] 
   Sent: Tuesday, July 08, 2003 9:24 AM
   To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
   Subject: RE: [PHP-DB] HEAP table
   
   
Create a create_date table with one record, one or two
   fields, and put the
   last refreshed time/date in it. If that's expired, refresh
   
   
   Gary Every
   Sr. UNIX Administrator
   Ingram Entertainment
   (615) 287-4876
   Pay It Forward
   mailto:[EMAIL PROTECTED]
   http://accessingram.com
   
   
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 10:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] HEAP table


I have a query that I would have liked to cache, but as it uses
UNIX_TIMESTAMP and has a user variable in it, where cacheing 
won't work, I 
looked around for another way to do it (it is used to create 
a smallish  
50 records table on each web page, so any speed increase is 
worthwhile).

I decided to go for the creation of a HEAP table, so that
anyone accessing 
the site would automatically access it. The existence of 
   the table is
tested for before initial creation by running a select
   against it and
testing the $result variable.

This works, as far as it goes, but it will require occasional
updating. 
And that's where I've come unstuck. How can I test for the 
time/date of 
the HEAP table's creation? If I can find that, then I can set 
a seconds 
value past which it should be dropped and recreated.

Any ideas?

Using MySQL 5.0.13, php 4.3.2 (on Windows XP), Apache 1.3
whatever. This 
also has to work on the website proper, using 5.0.13/4.3.1 and
 IIS5.


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



Re: RE: [PHP-DB] HEAP table

2003-07-09 Thread Terry Riley
Just remembered - this is the guy ([EMAIL PROTECTED]) that was so 
abominably rude a couple of weeks back. 

He's obviously found another way of shooting blanks!

--Original Message-  

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



[PHP-DB] HEAP table

2003-07-08 Thread Terry Riley
I have a query that I would have liked to cache, but as it uses 
UNIX_TIMESTAMP and has a user variable in it, where cacheing won't work, I 
looked around for another way to do it (it is used to create a smallish  
50 records table on each web page, so any speed increase is worthwhile).

I decided to go for the creation of a HEAP table, so that anyone accessing 
the site would automatically access it. The existence of the table is 
tested for before initial creation by running a select against it and 
testing the $result variable.

This works, as far as it goes, but it will require occasional updating. 
And that's where I've come unstuck. How can I test for the time/date of 
the HEAP table's creation? If I can find that, then I can set a seconds 
value past which it should be dropped and recreated.

Any ideas?

Using MySQL 5.0.13, php 4.3.2 (on Windows XP), Apache 1.3 whatever. This 
also has to work on the website proper, using 5.0.13/4.3.1 and IIS5.

Terry Riley


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