<!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><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.px-get-record.html">px_get_record</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.px-get-value.html">px_get_value</a></div> <div class="up"><a href="ref.paradox.html">Paradox Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.px-get-schema" class="refentry"> <div class="refnamediv"> <h1 class="refname">px_get_schema</h1> <p class="verinfo">(PECL paradox >= 1.0.0)</p><p class="refpurpose"><span class="refname">px_get_schema</span> — <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">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">array</span> <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> ] )</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">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">pxdoc</code></em></span> <dd> <p class="para"> Resource identifier of the paradox database as returned by <span class="function"><a href="function.px-new.html" class="function">px_new()</a></span>. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">mode</code></em></span> <dd> <p class="para"> If the optional <em><code class="parameter">mode</code></em> 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 <em><code class="parameter">mode</code></em> is 0 or not passed at all, then the key name will be identical to the field name. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.px-get-schema-returnvalues"> <h3 class="title">Return Values</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="function.px-get-info.html" class="function">px-get-info()</a></span>. </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.px-get-record.html">px_get_record</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.px-get-value.html">px_get_value</a></div> <div class="up"><a href="ref.paradox.html">Paradox Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>