Database - list table [closed]

0

How can I list all the DB table and put it in a table, list or any corner of the page?

    
asked by anonymous 06.06.2016 / 13:46

1 answer

2

The method below will return all the tables in your DB.

 public function listTable(){
    $query = $this->pdo->query('SELECT * FROM INFORMATION_SCHEMA.TABLES');
    return $query->fetchAll(PDO::FETCH_COLUMN);   
}
    
06.06.2016 / 14:09