Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 2549

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!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 a string containing the SQLSTATE returned by an SQL statement</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.db2-statistics.html">db2_statistics</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.db2-stmt-errormsg.html">db2_stmt_errormsg</a></div>
 <div class="up"><a href="ref.ibm-db2.html">IBM DB2 Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><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">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>db2_stmt_error</strong></span>
    ([ <span class="methodparam"><span class="type">resource</span> <code class="parameter">$stmt</code></span>
  ] )</div>


  <p class="para rdfs-comment">
   Returns a string containing the SQLSTATE value returned by an SQL statement.
  </p>
  <p class="para">
   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.html" class="function">db2_prepare()</a></span> or
    <span class="function"><a href="function.db2-exec.html" 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;? <em><code class="parameter">sqlstate-value</code></em>&#039;</code></strong>. You
   can also call  <span class="function"><a href="function.db2-stmt-errormsg.html" 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">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">stmt</code></em></span>
     <dd>

      <p class="para">
       A valid statement resource.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>

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


 

 <div class="refsect1 seealso" id="refsect1-function.db2-stmt-error-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.db2-conn-error.html" class="function" rel="rdfs-seeAlso">db2_conn_error()</a> - Returns a string containing the SQLSTATE returned by the last connection attempt</span></li>
    <li class="member"> <span class="function"><a href="function.db2-conn-errormsg.html" class="function" rel="rdfs-seeAlso">db2_conn_errormsg()</a> - Returns the last connection error message and SQLCODE value</span></li>
    <li class="member"> <span class="function"><a href="function.db2-stmt-errormsg.html" class="function" rel="rdfs-seeAlso">db2_stmt_errormsg()</a> - Returns a string containing the last SQL statement error message</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.db2-statistics.html">db2_statistics</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.db2-stmt-errormsg.html">db2_stmt_errormsg</a></div>
 <div class="up"><a href="ref.ibm-db2.html">IBM DB2 Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>