Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sybase_connect(3) [php man page]

SYBASE_CONNECT(3)														 SYBASE_CONNECT(3)

sybase_connect - Opens a Sybase server connection

SYNOPSIS
resource sybase_connect ([string $servername], [string $username], [string $password], [string $charset], [string $appname], [bool $new = false]) DESCRIPTION
sybase_connect(3) establishes a connection to a Sybase server. In case a second call is made to sybase_connect(3) with the same arguments, no new link will be established, but instead, the link identi- fier of the already opened link will be returned. The link to the server will be closed as soon as the execution of the script ends, unless it's closed earlier by explicitly calling sybase_close(3). PARAMETERS
o $servername - The servername argument has to be a valid servername that is defined in the 'interfaces' file. o $username - Sybase user name o $password - Password associated with $username. o $charset - Specifies the charset for the connection o $appname - Specifies an appname for the Sybase connection. This allow you to make separate connections in the same script to the same data- base. This may come handy when you have started a transaction in your current connection, and you need to be able to do a separate query which cannot be performed inside this transaction. o $new - Whether to open a new connection or use the existing one. RETURN VALUES
Returns a positive Sybase link identifier on success, or FALSE on failure. CHANGELOG
+--------+------------------------------------+ |Version | | | | | | | Description | | | | +--------+------------------------------------+ | 5.3.0 | | | | | | | The $new parameter was added. | | | | | 4.2.0 | | | | | | | The $appname parameter was added. | | | | | 4.0.2 | | | | | | | The $charset parameter was added. | | | | +--------+------------------------------------+ EXAMPLES
Example #1 sybase_connect(3) example <?php $link = sybase_connect('SYBASE', '', '') or die("Could not connect !"); echo "Connected successfully"; sybase_close($link); ?> SEE ALSO
sybase_pconnect(3), sybase_close(3). PHP Documentation Group SYBASE_CONNECT(3)

Check Out this Related Man Page

MSSQL_CONNECT(3)														  MSSQL_CONNECT(3)

mssql_connect - Open MS SQL server connection

SYNOPSIS
resource mssql_connect ([string $servername], [string $username], [string $password], [bool $new_link = false]) DESCRIPTION
mssql_connect(3) establishes a connection to a MS SQL server. The link to the server will be closed as soon as the execution of the script ends, unless it's closed earlier by explicitly calling mssql_close(3). PARAMETERS
o $servername - The MS SQL server. It can also include a port number, e.g. hostname:port (Linux), or hostname,port (Windows). o $username - The username. o $password - The password. o $new_link - If a second call is made to mssql_connect(3) with the same arguments, no new link will be established, but instead, the link identifier of the already opened link will be returned. This parameter modifies this behavior and makes mssql_connect(3) always open a new link, even if mssql_connect(3) was called before with the same parameters. RETURN VALUES
Returns a MS SQL link identifier on success, or FALSE on error. CHANGELOG
+--------+------------------------------------+ |Version | | | | | | | Description | | | | +--------+------------------------------------+ | 5.1.0 | | | | | | | The $new_link parameter was added | | | | +--------+------------------------------------+ EXAMPLES
Example #1 mssql_connect(3) example <?php // Server in the this format: <computer><instance name> or // <server>,<port> when using a non default port number $server = 'KALLESPCSQLEXPRESS'; // Connect to MSSQL $link = mssql_connect($server, 'sa', 'phpfi'); if (!$link) { die('Something went wrong while connecting to MSSQL'); } ?> SEE ALSO
mssql_close(3), mssql_pconnect(3). PHP Documentation Group MSSQL_CONNECT(3)
Man Page