method getDatabases documentation in bbn\Db\Languages\Mysql

Return databases' names as an array.

Example

X::dump($db->getDatabases()); /* (array)[ "db_customers", "db_clients", "db_empty", "db_example", "db_mail" ] function() { if (!$this->check()) { return null; } $x = []; if ($r = $this->rawQuery('SHOW DATABASES')) { $x = array_map( function ($a) { return $a['Database']; }, array_filter( $this->fetchAllResults($r, \PDO::FETCH_ASSOC), function ($a) { return ($a['Database'] === 'information_schema') || ($a['Database'] === 'mysql') ? false : 1; } ) ); sort($x); } return $x; }

Return databases' names 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.