<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Returns information about the client and specified connection</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.sqlsrv-cancel.html">sqlsrv_cancel</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.sqlsrv-close.html">sqlsrv_close</a></div> <div class="up"><a href="ref.sqlsrv.html">SQLSRV Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.sqlsrv-client-info" class="refentry"> <div class="refnamediv"> <h1 class="refname">sqlsrv_client_info</h1> <p class="verinfo">(No version information available, might only be in SVN)</p><p class="refpurpose"><span class="refname">sqlsrv_client_info</span> — <span class="dc-title">Returns information about the client and specified connection</span></p> </div> <div class="refsect1 description" id="refsect1-function.sqlsrv-client-info-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">array</span> <span class="methodname"><strong>sqlsrv_client_info</strong></span> ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$conn</code></span> )</div> <p class="para rdfs-comment"> Returns information about the client and specified connection </p> </div> <div class="refsect1 parameters" id="refsect1-function.sqlsrv-client-info-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">conn</code></em></span> <dd> <p class="para"> The connection about which information is returned. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.sqlsrv-client-info-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns an associative array with keys described in the table below. Returns <strong><code>FALSE</code></strong> otherwise. <table class="doctable table"> <caption><strong>Array returned by sqlsrv_client_info</strong></caption> <thead> <tr> <th>Key</th> <th>Description</th> </tr> </thead> <tbody class="tbody"> <tr> <td>DriverDllName</td> <td>SQLNCLI10.DLL</td> </tr> <tr> <td>DriverODBCVer</td> <td>ODBC version (xx.yy)</td> </tr> <tr> <td>DriverVer</td> <td>SQL Server Native Client DLL version (10.5.xxx)</td> </tr> <tr> <td>ExtensionVer</td> <td>php_sqlsrv.dll version (2.0.xxx.x)</td> </tr> </tbody> </table> </p> </div> <div class="refsect1 examples" id="refsect1-function.sqlsrv-client-info-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-2169"> <p><strong>Example #1 <span class="function"><strong>sqlsrv_client_info()</strong></span> example</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br />$serverName </span><span style="color: #007700">= </span><span style="color: #DD0000">"serverName\sqlexpress"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$connOptions </span><span style="color: #007700">= array(</span><span style="color: #DD0000">"UID"</span><span style="color: #007700">=></span><span style="color: #DD0000">"username"</span><span style="color: #007700">, </span><span style="color: #DD0000">"PWD"</span><span style="color: #007700">=></span><span style="color: #DD0000">"password"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$conn </span><span style="color: #007700">= </span><span style="color: #0000BB">sqlsrv_connect</span><span style="color: #007700">( </span><span style="color: #0000BB">$serverName</span><span style="color: #007700">, </span><span style="color: #0000BB">$connOptions </span><span style="color: #007700">);<br /><br />if( </span><span style="color: #0000BB">$conn </span><span style="color: #007700">=== </span><span style="color: #0000BB">false </span><span style="color: #007700">) {<br /> die( </span><span style="color: #0000BB">print_r</span><span style="color: #007700">( </span><span style="color: #0000BB">sqlsrv_errors</span><span style="color: #007700">(), </span><span style="color: #0000BB">true</span><span style="color: #007700">));<br />}<br /><br />if( </span><span style="color: #0000BB">$client_info </span><span style="color: #007700">= </span><span style="color: #0000BB">sqlsrv_client_info</span><span style="color: #007700">( </span><span style="color: #0000BB">$conn</span><span style="color: #007700">)) {<br /> foreach( </span><span style="color: #0000BB">$client_info </span><span style="color: #007700">as </span><span style="color: #0000BB">$key </span><span style="color: #007700">=> </span><span style="color: #0000BB">$value</span><span style="color: #007700">) {<br /> echo </span><span style="color: #0000BB">$key</span><span style="color: #007700">.</span><span style="color: #DD0000">": "</span><span style="color: #007700">.</span><span style="color: #0000BB">$value</span><span style="color: #007700">.</span><span style="color: #DD0000">"<br />"</span><span style="color: #007700">;<br /> }<br />} else {<br /> echo </span><span style="color: #DD0000">"Error in retrieving client info.<br />"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> </div> </p> </div> <div class="refsect1 seealso" id="refsect1-function.sqlsrv-client-info-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.sqlsrv-server-info.html" class="function" rel="rdfs-seeAlso">sqlsrv_server_info()</a> - Returns information about the server</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.sqlsrv-cancel.html">sqlsrv_cancel</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.sqlsrv-close.html">sqlsrv_close</a></div> <div class="up"><a href="ref.sqlsrv.html">SQLSRV Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>