mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
81 lines
4.6 KiB
HTML
81 lines
4.6 KiB
HTML
<!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>Sets the minimum error severity</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.mssql-min-error-severity" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">mssql_min_error_severity</h1>
|
|
<p class="verinfo">(PHP 4, PHP 5, PECL odbtp >= 1.1.1)</p><p class="refpurpose"><span class="refname">mssql_min_error_severity</span> — <span class="dc-title">Sets the minimum error severity</span></p>
|
|
|
|
</div>
|
|
|
|
<div id="function.mssql-min-error-severity-refsynopsisdiv">
|
|
<div class="warning"><strong class="warning">Warning</strong><p class="simpara">This function was
|
|
<em class="emphasis">REMOVED</em> in PHP 7.0.0.</p></div>
|
|
</div>
|
|
|
|
<div class="refsect1 description" id="refsect1-function.mssql-min-error-severity-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>mssql_min_error_severity</strong></span>
|
|
( <span class="methodparam"><span class="type">int</span> <code class="parameter">$severity</code></span>
|
|
) : <span class="type"><span class="type void">void</span></span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
Sets the minimum error severity.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.mssql-min-error-severity-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">severity</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The new error severity.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.mssql-min-error-severity-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
没有返回值。
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 examples" id="refsect1-function.mssql-min-error-severity-examples">
|
|
<h3 class="title">范例</h3>
|
|
<p class="para">
|
|
<div class="example" id="example-1766">
|
|
<p><strong>Example #1 <span class="function"><strong>mssql_min_error_severity()</strong></span> example</strong></p>
|
|
<div class="example-contents">
|
|
<div class="phpcode"><pre><span style="color: #000000">
|
|
<span style="color: #0000BB"><?php<br /></span><span style="color: #FF8000">// Connect to MSSQL and select the database<br /></span><span style="color: #0000BB">mssql_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">'KALLESPC\SQLEXPRESS'</span><span style="color: #007700">, </span><span style="color: #DD0000">'sa'</span><span style="color: #007700">, </span><span style="color: #DD0000">'phpfi'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">mssql_select_db</span><span style="color: #007700">(</span><span style="color: #DD0000">'php'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Set the minimum error severity to not include SQL <br />// syntax errors by setting it to something greater than <br />// or equal to 1.<br /></span><span style="color: #0000BB">mssql_min_error_severity</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Send a query we know that will cause an syntax error, in<br />// this case we use the MySQL quote signs instead of wrapping <br />// square brackets around the field and table names.<br /></span><span style="color: #0000BB">$query </span><span style="color: #007700">= </span><span style="color: #0000BB">mssql_query</span><span style="color: #007700">(</span><span style="color: #DD0000">'SELECT `syntax`, `error` FROM `MSSQL`'</span><span style="color: #007700">);<br /><br />if (!</span><span style="color: #0000BB">$query</span><span style="color: #007700">) {<br /> </span><span style="color: #FF8000">// Custom error handler ...<br /></span><span style="color: #007700">}<br /></span><span style="color: #0000BB">?></span>
|
|
</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</div>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div></div></div></body></html> |