mysql_tablename(result,offset)

Description: Returns the table name of a field in a result.

After calling mysql_list_tables(), which returns a resource identifier given by result, mysql_tablename() returns the name of the table indexed by offset.

Example:

$result = mysql_list_tables ("products_db");
for ($i = 0; $i < mysql_num_rows ($result); $i++) {
    echo mysql_tablename ($result, $i)."<BR>\n";
}

See also: mysql_list_tables()

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.