php-db | 2000121
Date: 12/14/00
- Next message: Soma Interesting: "[PHP-DB] extra spaces"
- Previous message: Andrew Hill: "[PHP-DB] resolved: OpenLink / PHP odbc_exec problems"
- In reply to: Dave VanAuken: "RE: [PHP-DB] closing database connection prior to redirection?"
- Next in thread: EaTrom: "Re: [PHP-DB] closing database connection prior to redirection?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
When you perform a Header redirect, you usually end the script anyway, and
even if there is stuff after that, it doesn't really matter, because the
redirect is handled client side, not server side, so as soon as the Header
is sent and the script ends (the place you are redirecting to doesn't
matter), it closes the connection, and as far as I know, it is true for all
database implementations (excluding the use of persistent connections,
which requires using the mysql_pconnect command or other similar command,
standard connects do not create persistent connections).
Matthew
At 02:04 PM 12/14/2000 -0500, you wrote:
>Is this for all database implementations? MySQl, PostgreSQL...
>particularly in the case of PHP header() redirect.
>
>thanks
>
>Dave
>
>-----Original Message-----
>From: Matthew Ballard [mailto:Matthew <email protected>]
>Sent: Thursday, December 14, 2000 1:26 PM
>To: php-db <email protected>
>Subject: Re: [PHP-DB] closing database connection prior to redirection?
>
>
>With PHP, when you hit the end of a script (which redirecting using
>Header(Location...) or Javascript or a Meta tag is), then as long as you
>don't use persistent conncetions, PHP automatically cleans up after the
>script including closing existing DB connections.
>Matthew
>
>At 01:59 AM 12/15/2000 +0800, you wrote:
> >I have a script that redirects itself to another location after it connects
> >to a database and makes use of it.
> >
> >If we connect to a database, do we have to close the connection prior to
> >redirection or end of script?
> >
> >What happens if we don't close the connection.
> >
> >Any help would be greatly appreciated.
> >Thanks in advance!
> >
> >Michael
> >
> >
> >--
> >PHP Database Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: php-db-unsubscribe <email protected>
> >For additional commands, e-mail: php-db-help <email protected>
> >To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-db-unsubscribe <email protected>
>For additional commands, e-mail: php-db-help <email protected>
>To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-db-unsubscribe <email protected>
>For additional commands, e-mail: php-db-help <email protected>
>To contact the list administrators, e-mail: php-list-admin <email protected>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Soma Interesting: "[PHP-DB] extra spaces"
- Previous message: Andrew Hill: "[PHP-DB] resolved: OpenLink / PHP odbc_exec problems"
- In reply to: Dave VanAuken: "RE: [PHP-DB] closing database connection prior to redirection?"
- Next in thread: EaTrom: "Re: [PHP-DB] closing database connection prior to redirection?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

