On Wed, 10 Jan 2001, Alexander Farber (EED) wrote:

> Hi,
>
> I have read
> http://perl.apache.org/guide/debug.html#Handling_the_User_pressed_Stop_
> but still don't know the best solution for my problem:
>
> I would like to port a bigger CGI-script to mod_perl.
> This script uses DBD::Sybase and creates few temporary
> tables (#temp1, #temp2) which are filled with some data,
> manipulated and finally read out with a join. These
> temporary tables are deleted automatically when the
> database connection is closed. However if I move from
> DBI to Apache::DBI, the connection won't be closed and
> the temporary tables will stay.
>
> So what is the best way to handle it? I could add
>
>   drop table #temp1
>   drop table #temp2
>
> to the SQL statements of my script, but what happens if
> the user presses STOP or the script times out? Should I
> move this SQL-code to $r->register_cleanup()?

END block for registry script. $r->register_cleanup for all.

> Isn't it
> too much for this handler and will it always be executed?

What do you mean? Previously you have deleted on connection close, what's
different now? Anyway the cleanup happens when the client has closed the
connection anyway (I mean after all the responce was send)



_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Reply via email to