mysql_field_table

(PHP 3, PHP 4 , PHP 5)

mysql_field_table --  Get name of the table the specified field is in

Description

string mysql_field_table ( resource result, int field_offset )

Returns the name of the table that the specified field is in.

Example 1. A mysql_field_table() example

<?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
?>

For downward compatibility mysql_fieldtable() can also be used. This is deprecated, however.

See also mysql_list_tables().

The Broward PHP Usergroup would like to thank the following sponsors.
  • South Florida Web Design

  • South Florida Maids

  • Miami Cleaning Service

  • Broward PHP Usergroup

  • Nationwide Real Estate Agent Directory

  • Fort Lauderdale Web Design

  • Real Estate Agent

  • Gourmet Flavored Coffee

  • convex optimization

  • convex optimization

  • Nationwide Bail Bonds Agent Directory

  • Fort Lauderdale Computer Repair

  • Broward County Computer Repair

  • dance music video

  • Miami Computer Repair