July 1999
Intermediate to advanced
502 pages
19h 52m
English
mysql_list_tables
MYSQL_RES *mysql_list_tables(MYSQL *mysql, const char *wild)
Returns a MYSQL_RES structure containing the names
of all existing tables in the current database that match the pattern
given by the second argument. This argument may be any standard SQL
regular expression. If a null pointer is passed instead, all tables
are listed. Like all MYSQL_RES structures, the
return value of this function must be freed with
mysql_free_result. This function returns a null
value in the case of an error.
MYSQL_RES tables;
tables = mysql_list_tables(&mysql, "p%");
/* 'tables' now contains the names of all tables in the current database
that start with 'p' */Read now
Unlock full access