Query: mssql_select_db
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
MSSQL_SELECT_DB(3) MSSQL_SELECT_DB(3) mssql_select_db - Select MS SQL databaseSYNOPSISbool mssql_select_db (string $database_name, [resource $link_identifier])DESCRIPTIONmssql_select_db(3) sets the current active database on the server that's associated with the specified link identifier. Every subsequent call to mssql_query(3) will be made on the active database.PARAMETERSo $database_name - The database name. To escape the name of a database that contains spaces, hyphens ("-"), or any other exceptional characters, the database name must be enclosed in brackets, as is shown in the example, below. This technique must also be applied when selecting a database name that is also a reserved word (such as primary). o $link_identifier - A MS SQL link identifier, returned by mssql_connect(3) or mssql_pconnect(3). If no link identifier is specified, the last opened link is assumed. If no link is open, the function will try to establish a link as if mssql_connect(3) was called, and use it.RETURN VALUESReturns TRUE on success or FALSE on failure.EXAMPLESExample #1 mssql_select_db(3) example <?php // Create a link to MSSQL $link = mssql_connect('KALLESPCSQLEXPRESS', 'sa', 'phpfi'); // Select the database 'php' mssql_select_db('php', $link); ?> Example #2 Escaping the database name with square brackets <?php // Create a link to MSSQL $link = mssql_connect('KALLESPCSQLEXPRESS', 'sa', 'phpfi'); // Select the database 'my.database-name' mssql_select_db('[my.database-name]', $link); ?>SEE ALSOmssql_connect(3), mssql_pconnect(3), mssql_query(3). PHP Documentation Group MSSQL_SELECT_DB(3)
Related Man Pages |
---|
mysql_error(3) - php |
ibase_pconnect(3) - php |
fbsql_read_clob(3) - php |
mssql_bind(3) - php |
mssql_fetch_field(3) - php |
Similar Topics in the Unix Linux Community |
---|
Veritas or Legato?? |
open a web link from |
Test command - Two square brackets |
Purge of Users in Database |
Smarter way to read $1 $2 in php |