Re: [Fwd: [PATCH] add appname argument to sybase_connect]
| From: | Christophe Sollet | Date: | Wed, 06 Mar 2002 18:26:36 +0000 |
| Subject: | Re: [Fwd: [PATCH] add appname argument to sybase_connect] | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-80808@lists.php.net to get a copy of this message | ||
derick@php.net wrote:
> Hello,
>
> I applied it. Can you also write some documentation about it?
>
Thanks.
At least, i can try... :
int sybase_connect ( string servername, string username, string password [, string charset [, string
appname]])
int sybase_pconnect ( string servername, string username, string password [, string charset [,
string appname]])
optional argument appname : set the appname used by the sybase connection to something else than the
default string "PHP 4.0".
This string will appear in the table "sysprocesses" (or in the Sybase GUI) and can be used
to track connections more easely.
As a side effect, it can be used to create distinct connections. This can be usefull sometimes :
$c1 = sybase_connect("servername", "username", "password",
"charset", "c1");
$c2 = sybase_connect("servername", "username", "password",
"charset", "c2");
c1 : begin transaction
c1 : ... query ...
c2 : make a query that can't be achieved in trans. (ie. create temp table without DDL_IN_TRANS
on tempdb).
c1 : ... query ...
c1 : commit|rollback transaction
Hope that can help,
Christophe.
--
--------------------------
Christophe Sollet
csollet@coleebris.com
http://www.coleebris.com
Tél: 01.40.50.60.47
Fax: 01.40.50.67.66
--------------------------