Source of: /manual/en/function.odbc-errormsg.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.uodbc.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'function.odbc-errormsg.php',
1 => 'odbc_errormsg',
),
'up' =>
array (
0 => 'ref.uodbc.php',
1 => 'ODBC Functions',
),
'prev' =>
array (
0 => 'function.odbc-error.php',
1 => 'odbc_error',
),
'next' =>
array (
0 => 'function.odbc-exec.php',
1 => 'odbc_exec',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="function.odbc-errormsg" class="refentry">
<div class="refnamediv">
<h1 class="refname">odbc_errormsg</h1>
<p class="verinfo">(PHP 4 >= 4.0.5, PHP 5)</p><p class="refpurpose"><span class="refname">odbc_errormsg</span> — <span class="dc-title">Get the last error message</span></p>
</div>
<a name="function.odbc-errormsg.description"></a><div class="refsect1 description">
<h3 class="title">Description</h3>
<div class="methodsynopsis dc-description">
<span class="type">string</span> <span class="methodname"><b>odbc_errormsg</b></span>
([ <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$connection_id</tt></span>
] )</div>
<p class="simpara">
Returns a string containing the last ODBC error message, or an empty
string if there has been no errors.
</p>
</div>
<a name="function.odbc-errormsg.parameters"></a><div class="refsect1 parameters">
<h3 class="title">Parameters</h3>
<p class="para">
</p><dl>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">connection_id</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">The ODBC connection identifier,
see <a href="function.odbc-connect.php" class="function">odbc_connect()</a> for details.</p>
</dd>
</dl>
<p>
</p>
</div>
<a name="function.odbc-errormsg.returnvalues"></a><div class="refsect1 returnvalues">
<h3 class="title">Return Values</h3>
<p class="para">
If <i><tt class="parameter">connection_id</tt></i>
is specified, the last state
of that connection is returned, else the last state of any connection
is returned.
</p>
<p class="para">
This function returns meaningful value only if last odbc query failed
(i.e. <a href="function.odbc-exec.php" class="function">odbc_exec()</a> returned <b><tt class="constant">FALSE</tt></b>).
</p>
</div>
<a name="function.odbc-errormsg.seealso"></a><div class="refsect1 seealso">
<h3 class="title">See Also</h3>
<p class="para">
</p><ul class="simplelist">
<li class="member"><a href="function.odbc-error.php" class="function" rel="rdfs-seeAlso">odbc_error()</a> - Get the last error code</li>
<li class="member"><a href="function.odbc-exec.php" class="function" rel="rdfs-seeAlso">odbc_exec()</a> - Prepare and execute a SQL statement</li>
</ul><p>
</p>
</div>
</div><?php manual_footer(); ?>