• Welcome to Simple Machines Community Forum. Please login or sign up.



Fetches a list of tables in the database


array smf_db_list_tables ([string $db[, string $filter]])

Parameter $db

Expected type: String
Description: If specified, SMF will look for tables in this database instead of its own database

Parameter $filter

Expected type: String
Description: Returns only tables matching this pattern (ie "LIKE $filter"), otherwise lists all tables in the database

Return value

Expected type: Array
Description: An array of table names


  • Lists tables from the database in Settings.php unless $db is specified
  • If $filter is specified, the function will only get a list of tables matching the specified filter (ie "LIKE $filter")
  • Returns an array of table names