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

85 lines
3.0 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>Returns the database schema</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.px-get-schema" class="refentry">
<div class="refnamediv">
<h1 class="refname">px_get_schema</h1>
<p class="verinfo">(PECL paradox &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">px_get_schema</span> &mdash; <span class="dc-title">Returns the database schema</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.px-get-schema-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>px_get_schema</strong></span>
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$pxdoc</code></span>
[, <span class="methodparam"><span class="type">int</span> <code class="parameter">$mode</code><span class="initializer"> = 0</span></span>
] ) : <span class="type">array</span></div>
<p class="para rdfs-comment">
<span class="function"><strong>px_get_schema()</strong></span> returns the database schema.
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.px-get-schema-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">pxdoc</code></dt>
<dd>
<p class="para">
Resource identifier of the paradox database
as returned by <span class="function"><a href="px_new.html" class="function">px_new()</a></span>.
</p>
</dd>
<dt>
<code class="parameter">mode</code></dt>
<dd>
<p class="para">
If the optional <code class="parameter">mode</code> is
<strong><code>PX_KEYTOLOWER</code></strong> or
<strong><code>PX_KEYTOUPPER</code></strong> the keys of the returned array
will be converted to lower
or upper case. If <code class="parameter">mode</code> is 0 or not passed at all,
then the key name will be identical to the field name.
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.px-get-schema-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
Returns the schema of a database file as an associated array. The key name
is equal to the field name. Each array element is itself an associated
array containing the two fields <em>type</em> and
<em>size</em>. <em>type</em> is one of the constants in
table <a href="paradox.constants.html#paradox.table-fieldtypes" class="link">Constants for field
types</a>. <em>size</em> is the number of bytes this field
consumes in the record. The total of all field sizes is equal to the
record size as it can be retrieved with <span class="function"><a href="px_get_info.html" class="function">px-get-info()</a></span>.
</p>
</div>
</div></div></div></body></html>