mysql_list_tables(database_name,[,link_identifier])

Description: Lists tables in a MySQL database.

Retrieves information about database database_name and returns a result pointer. This pointer (denoted in this appendix by result) can then be passed to mysql_tablename(), which returns information on table names.

Example:

$result = mysql_list_tables ("products_db");
while ($row = mysql_fetch_row ($result)) {
    echo "$row[0]<BR>\n";
}

See also: mysql_field_flags(), mysql_field_len(), mysql_field_name(), mysql_field_type()

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.