uTools-Manuals/docs/php/pg_last_error.html
2019-04-08 23:22:26 +08:00

40 lines
2.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>得到某连接的最后一条错误信息</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.pg-last-error" class="refentry">
<div class="refnamediv">
<h1 class="refname">pg_last_error</h1>
<p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">pg_last_error</span> &mdash; <span class="dc-title">得到某连接的最后一条错误信息</span></p>
</div>
<div class="refsect1 unknown-seealsp" id="refsect1-function.pg-last-error-unknown-seealsp">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>pg_last_error</strong></span>
([ <span class="methodparam"><span class="type">resource</span> <code class="parameter">$connection</code></span>
] ) : <span class="type">string</span></div>
<p class="para rdfs-comment">
<span class="function"><strong>pg_last_error()</strong></span> 返回指定连接 <code class="parameter">connection</code> 的最后一条错误信息。
</p>
<p class="para">
错误信息可能会被 PostgreSQL(libpq) 的内部函数调用所覆盖。如果 PostgreSQL 的内部模块函数产生了多个错误,则可能不能返回适当的错误信息。
</p>
<p class="para">
使用 <span class="function"><a href="pg_result_error.html" class="function">pg_result_error()</a></span><span class="function"><a href="pg_result_status.html" class="function">pg_result_status()</a></span><span class="function"><a href="pg_connection_status.html" class="function">pg_connection_status()</a></span> 来取得更好的错误处理。
</p>
<blockquote class="note"><p><strong class="note">Note</strong>:
<p class="para">
本函数以前的名字为 <em>pg_errormessage()</em>
</p>
</p></blockquote>
<p class="para">
参见 <span class="function"><a href="pg_result_error.html" class="function">pg_result_error()</a></span>
</p>
</div>
</div></div></div></body></html>