Re: DROP TEMP TABLES
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: DROP TEMP TABLES

From: Jerry Sievers <jerry@jerrysievers.com>
Date: Sat Oct 15 2005 - 14:55:58 CEST

"Jay" <patel@cs.utk.edu> writes:

> Hey there,
> I have a question. Is it possible to to construct something through
> a combination of php and javascript that (when a browser window is
> closed) would drop temp tables that are used? I've tried to use an

Sure. You need a php script that will take an arg that tells it what
table to drop.

Call this script in a JS onClose event. Have the page that loads as a
result of this close itself instantly with an onClose in the onLoad
event.

Security and all the fine details of this left as your exercise.

And of course, this isn't going to be totally reliable since not
everyone has JS enabled.

May I suggest you abandon this silliness and timestamp your temporary
tables and drop them with an hourly (or whatever) batch process?

Or what about using a trigger or rule on the insert to the timestamp
table that tries to drop old tables whenever a new one is created.

HTH

-- 
-------------------------------------------------------------------------------
Jerry Sievers   305 854-3001 (home)     WWW ECommerce Consultant
                305 321-1144 (mobile	http://www.JerrySievers.com/
Received on Tue Oct 18 02:41:33 2005