<!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>Set options</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.maxdb-num-rows.html">maxdb_num_rows</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.maxdb-param-count.html">maxdb_param_count</a></div> <div class="up"><a href="ref.maxdb.html">MaxDB Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.maxdb-options" class="refentry"> <div class="refnamediv"> <h1 class="refname">maxdb_options</h1> <h1 class="refname">maxdb::options</h1> <p class="verinfo">(PECL maxdb >= 1.0)</p><p class="refpurpose"><span class="refname">maxdb_options</span> -- <span class="refname">maxdb::options</span> — <span class="dc-title">Set options</span></p> </div> <div class="refsect1 description" id="refsect1-function.maxdb-options-description"> <h3 class="title">Description</h3> <p class="para">Procedural style</p> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>maxdb_options</strong></span> ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$link</code></span> , <span class="methodparam"><span class="type">int</span> <code class="parameter">$option</code></span> , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span> )</div> <p class="para rdfs-comment">Object oriented style</p> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>maxdb::options</strong></span> ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$option</code></span> , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span> )</div> <p class="para rdfs-comment"> <span class="function"><strong>maxdb_options()</strong></span> can be used to set extra connect options and affect behavior for a connection. </p> <p class="para"> This function may be called multiple times to set several options. </p> <p class="para"> <span class="function"><strong>maxdb_options()</strong></span> should be called after <span class="function"><a href="function.maxdb-init.html" class="function">maxdb_init()</a></span> and before <span class="function"><a href="function.maxdb-real-connect.html" class="function">maxdb_real_connect()</a></span>. </p> <p class="para"> The parameter <em><code class="parameter">option</code></em> is the option that you want to set, the <em><code class="parameter">value</code></em> is the value for the option. For detailed description of the options see <a href="http://maxdb.sap.com/documentation/" class="link external">» http://maxdb.sap.com/documentation/</a> The parameter <em><code class="parameter">option</code></em> can be one of the following values: <table class="doctable table"> <caption><strong>Valid options</strong></caption> <thead> <tr> <th>Name</th> <th>Description</th> </tr> </thead> <tbody class="tbody"> <tr> <td><strong><code>MAXDB_COMPNAME</code></strong></td> <td>The component name used to initialise the SQLDBC runtime environment.</td> </tr> <tr> <td><strong><code>MAXDB_APPLICATION</code></strong></td> <td>The application to be connected to the database.</td> </tr> <tr> <td><strong><code>MAXDB_APPVERSION</code></strong></td> <td>The version of the application.</td> </tr> <tr> <td><strong><code>MAXDB_SQLMODE</code></strong></td> <td> The SQL mode. </td> </tr> <tr> <td><strong><code>MAXDB_UNICODE</code></strong></td> <td> TRUE, if the connection is an unicode (UCS2) client or FALSE, if not. </td> </tr> <tr> <td><strong><code>MAXDB_TIMEOUT</code></strong></td> <td> The maximum allowed time of inactivity after which the connection to the database is closed by the system. </td> </tr> <tr> <td><strong><code>MAXDB_ISOLATIONLEVEL</code></strong></td> <td> Specifies whether and how shared locks and exclusive locks are implicitly requested or released. </td> </tr> <tr> <td><strong><code>MAXDB_PACKETCOUNT</code></strong></td> <td> The number of different request packets used for the connection. </td> </tr> <tr> <td><strong><code>MAXDB_STATEMENTCACHESIZE</code></strong></td> <td> The number of prepared statements to be cached for the connection for re-use. </td> </tr> <tr> <td><strong><code>MAXDB_CURSORPREFIX</code></strong></td> <td> The prefix to use for result tables that are automatically named. </td> </tr> </tbody> </table> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.maxdb-options-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. </p> </div> <div class="refsect1 examples" id="refsect1-function.maxdb-options-examples"> <h3 class="title">Examples</h3> <p class="para"> See <span class="function"><a href="function.maxdb-real-connect.html" class="function">maxdb_real_connect()</a></span>. </p> </div> <div class="refsect1 seealso" id="refsect1-function.maxdb-options-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.maxdb-init.html" class="function" rel="rdfs-seeAlso">maxdb_init()</a> - Initializes MaxDB and returns an resource for use with maxdb_real_connect</span></li> <li class="member"> <span class="function"><a href="function.maxdb-real-connect.html" class="function" rel="rdfs-seeAlso">maxdb_real_connect()</a> - Opens a connection to a MaxDB 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.maxdb-num-rows.html">maxdb_num_rows</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.maxdb-param-count.html">maxdb_param_count</a></div> <div class="up"><a href="ref.maxdb.html">MaxDB Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>