<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.ibm-db2.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.db2-stmt-error.php',
    1 => 'db2_stmt_error',
    2 => 'Returns a string containing the SQLSTATE returned by an SQL statement',
  ),
  'up' => 
  array (
    0 => 'ref.ibm-db2.php',
    1 => 'IBM DB2 Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.db2-statistics.php',
    1 => 'db2_statistics',
  ),
  'next' => 
  array (
    0 => 'function.db2-stmt-errormsg.php',
    1 => 'db2_stmt_errormsg',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/ibm_db2/functions/db2-stmt-error.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.db2-stmt-error" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">db2_stmt_error</h1>
  <p class="verinfo">(PECL ibm_db2 &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">db2_stmt_error</span> &mdash; <span class="dc-title">
   Returns a string containing the SQLSTATE returned by an SQL statement
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.db2-stmt-error-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>db2_stmt_error</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span></span> <code class="parameter">$stmt</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>


  <p class="simpara">
   Returns a string containing the SQLSTATE value returned by an SQL statement.
  </p>
  <p class="simpara">
   If you do not pass a statement resource as an argument to
   <span class="function"><strong>db2_stmt_error()</strong></span>, the driver returns the SQLSTATE
   value associated with the last attempt to return a statement resource, for
   example, from <span class="function"><a href="function.db2-prepare.php" class="function">db2_prepare()</a></span> or
   <span class="function"><a href="function.db2-exec.php" class="function">db2_exec()</a></span>.
  </p>
  <p class="para">
   To learn what the SQLSTATE value means, you can issue the following command
   at a DB2 Command Line Processor prompt:
   <strong class="userinput"><code>db2 &#039;? <code class="parameter">sqlstate-value</code>&#039;</code></strong>. You
   can also call <span class="function"><a href="function.db2-stmt-errormsg.php" class="function">db2_stmt_errormsg()</a></span> to retrieve an
   explicit error message and the associated SQLCODE value.
  </p>

 </div>

 <div class="refsect1 parameters" id="refsect1-function.db2-stmt-error-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <dl>
   
    <dt><code class="parameter">stmt</code></dt>
    <dd>
     <span class="simpara">
      A valid statement resource.
     </span>
    </dd>
   
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.db2-stmt-error-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="simpara">
   Returns a string containing an SQLSTATE value.
  </p>
 </div>


 

 <div class="refsect1 seealso" id="refsect1-function.db2-stmt-error-seealso">
  <h3 class="title">Vedere anche:</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.db2-conn-error.php" class="function" rel="rdfs-seeAlso">db2_conn_error()</a> - Returns a string containing the SQLSTATE returned by the last connection attempt</span></li>
   <li><span class="function"><a href="function.db2-conn-errormsg.php" class="function" rel="rdfs-seeAlso">db2_conn_errormsg()</a> - Returns the last connection error message and SQLCODE value</span></li>
   <li><span class="function"><a href="function.db2-stmt-errormsg.php" class="function" rel="rdfs-seeAlso">db2_stmt_errormsg()</a> - Returns a string containing the last SQL statement error message</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>