<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="function.cubrid-set-db-parameter" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>cubrid_set_db_parameter</refname>
  <refpurpose>Sets the CUBRID database parameters</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>bool</type><methodname>cubrid_set_db_parameter</methodname>
   <methodparam><type>resource</type><parameter>conn_identifier</parameter></methodparam>  
   <methodparam><type>int</type><parameter>param_type</parameter></methodparam>  
   <methodparam><type>int</type><parameter>param_value</parameter></methodparam>  
  </methodsynopsis>
  <para>
   The <function>cubrid_set_db_parameter</function> function is used to set
   the CUBRID database parameters. It can set the following CUBRID database
   parameters:
  </para>
  <para>
   <simplelist>
    <member><constant>PARAM_ISOLATION_LEVEL</constant></member>
    <member><constant>PARAM_LOCK_TIMEOUT</constant></member>
   </simplelist>
  </para>

  <note>
   <para>
    The auto-commit mode can be set by using
    <function>cubrid_set_autocommit</function>.
   </para>
  </note>
 </refsect1>

 <refsect1 role="parameters">
 &reftitle.parameters;
 <para>
  <variablelist>
   <varlistentry>
    <term><parameter>conn_identifier</parameter></term>
     <listitem><para>
      The CUBRID connection. If the connection identifier is not specified,
      the last link opened by <function>cubrid_connect</function> is assumed.
     </para></listitem>
   </varlistentry>
   <varlistentry>
    <term><parameter>param_type</parameter></term>
    <listitem><para>Database parameter type.</para></listitem>
   </varlistentry>
   <varlistentry>
    <term><parameter>param_value</parameter></term>
    <listitem><para>Isolation level value (1-6) or lock timeout (in seconds) value.</para></listitem>
   </varlistentry>
  </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &return.success;
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <example>
   <title><function>cubrid_get_db_parameter</function> example</title>
   <programlisting role="php">
<![CDATA[
<?php
$conn = cubrid_connect("localhost", 33000, "demodb", "dba");

$params = cubrid_get_db_parameter($conn);
var_dump($params);

cubrid_set_autocommit($conn, CUBRID_AUTOCOMMIT_TRUE);
cubrid_set_db_parameter($conn, CUBRID_PARAM_ISOLATION_LEVEL, 2);

$params_new = cubrid_get_db_parameter($conn);
var_dump($params_new);

cubrid_disconnect($conn);
?>
]]>
   </programlisting>
    &example.outputs;
    <screen>
<![CDATA[
array(4) {
  ["PARAM_ISOLATION_LEVEL"]=>
  int(3)
  ["PARAM_LOCK_TIMEOUT"]=>
  int(-1)
  ["PARAM_MAX_STRING_LENGTH"]=>
  int(1073741823)
  ["PARAM_AUTO_COMMIT"]=>
  int(0)
}
array(4) {
  ["PARAM_ISOLATION_LEVEL"]=>
  int(2)
  ["PARAM_LOCK_TIMEOUT"]=>
  int(-1)
  ["PARAM_MAX_STRING_LENGTH"]=>
  int(1073741823)
  ["PARAM_AUTO_COMMIT"]=>
  int(1)
}
]]>
    </screen>
  </example>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>cubrid_get_db_parameter</function></member>
    <member><function>cubrid_set_autocommit</function></member>
   </simplelist>
  </para>
 </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
