PHP MySQL Functions to list table names in a databasesWe can list tables present in a database by using this query Using this we can develop a PHP script to display all tables. We can display tables of a database by changing the above query. Above query will return all the tables of the database pdoSimilarly if we want to list all the tables starting with char t then we can use LIKE command. Here is the query. Above query can be placed inside the PHP code [shown above ] to display matching tables. For easy understanding here again the php code.
|