mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-19 10:28:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@163326 c90b9560-bf6c-de11-be94-00142212c4b1
71 lines
1.9 KiB
XML
71 lines
1.9 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.4 $ -->
|
|
<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -->
|
|
<refentry id="function.mysql-field-table">
|
|
<refnamediv>
|
|
<refname>mysql_field_table</refname>
|
|
<refpurpose>
|
|
Get name of the table the specified field is in
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>mysql_field_table</methodname>
|
|
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>field_offset</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Returns the name of the table that the specified field is
|
|
in.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>A <function>mysql_field_table</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$result = mysql_query("SELECT name,comment FROM people,comments");
|
|
if (!$result) {
|
|
echo 'Could not run query: ' . mysql_error();
|
|
exit;
|
|
}
|
|
|
|
// Assuming name is in the people table
|
|
$table = mysql_field_table($result, 'name');
|
|
echo $table; // people
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
For downward compatibility <function>mysql_fieldtable</function>
|
|
can also be used. This is deprecated, however.
|
|
</para>
|
|
<para>
|
|
See also <function>mysql_list_tables</function>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|