method getTables documentation in bbn\Db\Languages\Mysql

Return tables' names of a database as an array.

Example

X::dump($db->getTables('db_example')); /* (array) [ "clients", "columns", "cron", "journal", "dbs", "examples", "history", "hosts", "keys", "mails", "medias", "notes", "medias", "versions" ] function(string $database = '') { if (!$this->check()) { return null; } if (empty($database) || !bbn\Str::checkName($database)) { $database = $this->getCurrent(); } $t2 = []; if (($r = $this->rawQuery("SHOW TABLES FROM `$database`")) && ($t1 = $this->fetchAllResults($r, PDO::FETCH_NUM)) ) { foreach ($t1 as $t) { $t2[] = $t[0]; } } return $t2; }

Return tables' names of a database as an array. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.