Posted by Jerry Sievers on 12/02/58 11:29
"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/
[Back to original message]
|