<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/refs.database.vendors.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'book.sqlsrv.php',
    1 => 'SQLSRV',
    2 => 'Microsoft SQL Server Driver for PHP',
  ),
  'up' => 
  array (
    0 => 'refs.database.vendors.php',
    1 => 'Vendor Specific Database Extensions',
  ),
  'prev' => 
  array (
    0 => 'sqlite3result.reset.php',
    1 => 'SQLite3Result::reset',
  ),
  'next' => 
  array (
    0 => 'sqlsrv.setup.php',
    1 => 'Installing/Configuring',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/sqlsrv/book.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/book.sqlsrv.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="book.sqlsrv" class="book">
 
 <h1 class="title">Microsoft SQL Server Driver for PHP</h1>
 

 
 <div id="intro.sqlsrv" class="preface">
  <h1 class="title">Introduction</h1>
  <p class="simpara">
   The SQLSRV extension allows you to access Microsoft SQL Server and SQL Azure
   databases. The 3.0 release of the driver supports
   SQL Server, beginning with SQL Server 2005, including SQL Server 2012 and SQL
   Server 2012 LocalDB. (For more information about LocalDB, see
   <a href="http://msdn.microsoft.com/en-us/library/hh487161.aspx" class="link external">&raquo;&nbsp;PHP Driver for SQL Server Support for LocalDB</a>
   and <a href="http://msdn.microsoft.com/en-us/library/hh510202(SQL.110).aspx" class="link external">&raquo;&nbsp;SQL Server 2012 Express LocalDB</a>.)
  </p>
  <p class="simpara">
   The SQLSRV extension is supported by Microsoft and available for download here:
   <a href="http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx" class="link external">&raquo;&nbsp;http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx</a>. SQL Server 2012 LocalDB can be
   downloaded here: <a href="http://go.microsoft.com/fwlink/?LinkID=237665" class="link external">&raquo;&nbsp;http://go.microsoft.com/fwlink/?LinkID=237665</a>.
  </p>
 </div>
 

 




 




 






<ul class="chunklist chunklist_book"><li><a href="sqlsrv.setup.php">Installing/Configuring</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="sqlsrv.requirements.php">Requirements</a></li><li><a href="sqlsrv.installation.php">Installation</a></li><li><a href="sqlsrv.configuration.php">Runtime Configuration</a></li><li><a href="sqlsrv.resources.php">Resource Types</a></li></ul></li><li><a href="sqlsrv.constants.php">Predefined Constants</a></li><li><a href="ref.sqlsrv.php">SQLSRV Functions</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="function.sqlsrv-begin-transaction.php">sqlsrv_begin_transaction</a> — Begins a database transaction</li><li><a href="function.sqlsrv-cancel.php">sqlsrv_cancel</a> — Cancels a statement</li><li><a href="function.sqlsrv-client-info.php">sqlsrv_client_info</a> — Returns information about the client and specified connection</li><li><a href="function.sqlsrv-close.php">sqlsrv_close</a> — Closes an open connection and releases resourses associated with the connection</li><li><a href="function.sqlsrv-commit.php">sqlsrv_commit</a> — Commits a transaction that was begun with sqlsrv_begin_transaction</li><li><a href="function.sqlsrv-configure.php">sqlsrv_configure</a> — Changes the driver error handling and logging configurations</li><li><a href="function.sqlsrv-connect.php">sqlsrv_connect</a> — Opens a connection to a Microsoft SQL Server database</li><li><a href="function.sqlsrv-errors.php">sqlsrv_errors</a> — Returns error and warning information about the last SQLSRV operation performed</li><li><a href="function.sqlsrv-execute.php">sqlsrv_execute</a> — Executes a statement prepared with sqlsrv_prepare</li><li><a href="function.sqlsrv-fetch.php">sqlsrv_fetch</a> — Makes the next row in a result set available for reading</li><li><a href="function.sqlsrv-fetch-array.php">sqlsrv_fetch_array</a> — Returns a row as an array</li><li><a href="function.sqlsrv-fetch-object.php">sqlsrv_fetch_object</a> — Retrieves the next row of data in a result set as an object</li><li><a href="function.sqlsrv-field-metadata.php">sqlsrv_field_metadata</a> — Retrieves metadata for the fields of a statement prepared by
  sqlsrv_prepare or sqlsrv_query</li><li><a href="function.sqlsrv-free-stmt.php">sqlsrv_free_stmt</a> — Frees all resources for the specified statement</li><li><a href="function.sqlsrv-get-config.php">sqlsrv_get_config</a> — Returns the value of the specified configuration setting</li><li><a href="function.sqlsrv-get-field.php">sqlsrv_get_field</a> — Gets field data from the currently selected row</li><li><a href="function.sqlsrv-has-rows.php">sqlsrv_has_rows</a> — Indicates whether the specified statement has rows</li><li><a href="function.sqlsrv-next-result.php">sqlsrv_next_result</a> — Makes the next result of the specified statement active</li><li><a href="function.sqlsrv-num-fields.php">sqlsrv_num_fields</a> — Retrieves the number of fields (columns) on a statement</li><li><a href="function.sqlsrv-num-rows.php">sqlsrv_num_rows</a> — Retrieves the number of rows in a result set</li><li><a href="function.sqlsrv-prepare.php">sqlsrv_prepare</a> — Prepares a query for execution</li><li><a href="function.sqlsrv-query.php">sqlsrv_query</a> — Prepares and executes a query</li><li><a href="function.sqlsrv-rollback.php">sqlsrv_rollback</a> — Rolls back a transaction that was begun with
  sqlsrv_begin_transaction</li><li><a href="function.sqlsrv-rows-affected.php">sqlsrv_rows_affected</a> — Returns the number of rows modified by the last INSERT, UPDATE, or
  DELETE query executed</li><li><a href="function.sqlsrv-send-stream-data.php">sqlsrv_send_stream_data</a> — Sends data from parameter streams to the server</li><li><a href="function.sqlsrv-server-info.php">sqlsrv_server_info</a> — Returns information about the server</li></ul></li></ul></div><?php manual_footer($setup); ?>