Sybase_connect returning string ??

From: Date: Wed, 19 Jul 2000 14:47:37 +0000
Subject: Sybase_connect returning string ??
Groups: php.db 
Request: Send a blank email to php-db+get-1283@lists.php.net to get a copy of this message
Hi All The documentation for sybase_connect() claims to return an integer, and this is indeed the case when using the sybase db library. However, when using ct-lib the function sometimes returns a string e.g. Resource id #1 and some odd behaviour as illustrated in the code below. The following code: for ($i=0;$i<8;$i++) { echo sybase_connect("SYBASE","xx","xxx"); sybase_select_db("mydb"); } Produces: Resource id #1 1 1 1 Warning 1 is not a valid Sybase-Link resource in /xxx/xxx/..... line x Resource id # 2 2 2 2 Warning 2 is not a valid Sybase-Link resource in /xxx/xxx/..... line x If sybase_close() is added below the statement sybase_select_db("mydb") the following results: Resource id #1 Resource id #2 Resource id #3 .. Resource id #8 Any ideas as to this behaviour? Thanks David. PS PHP configuration: --with-apache=/src/local/apache --with-sybase-ct=/opt/sybase --enable-trans-sid Version 4.0.1pl2 Apache 3.1.12 Sybase 11.0.0.3

« previous php.db (#1283) next »