FuelPHP Bin
<?php // db.php config return array( 'active' => 'default', 'default' => array( 'type' => 'mysql', 'connection' => array( 'dsn' => 'mysql:host=localhost;dbname=DEV_FuelTest', 'username' => '******', 'password' => '******', 'persistent' => false, 'compress' => false, ), 'identifier' => '`', 'table_prefix' => '', 'charset' => 'utf8', 'collation' => 'utf8_general_ci', 'enable_cache' => true, 'profiling' => true, ), 'test' => array( 'type' => 'mysql', 'connection' => array( 'dsn' => 'mysql:host=localhost;dbname=DEV_FuelDepot', 'username' => '******', 'password' => '******', 'persistent' => false, 'compress' => false, ), 'identifier' => '`', 'table_prefix' => '', 'charset' => 'utf8', 'collation' => 'utf8_general_ci', 'enable_cache' => true, 'profiling' => true, ), ); // test code <?php class Controller_Test extends Controller { /** * */ public function action_index() { $x1 = \DB::list_tables('users%'); // default $x2 = \DB::list_tables('users%', 'default'); // same as above $x3 = \DB::list_tables('users%', 'test'); var_dump($x1, $x2, $x3); $x1 = \DB::select('username')->from('users')->limit(1)->execute()->as_array(); $x2 = \DB::select('username')->from('users')->limit(1)->execute('default')->as_array(); $x3 = \DB::select('username')->from('users')->limit(1)->execute('test')->as_array(); var_dump($x1, $x2, $x3); } } // result /data/www/hosts/fuel/19develop/fuel/app/classes/controller/test.php:23: array (size=7) 0 => string 'users' (length=5) 1 => string 'users_clients' (length=13) 2 => string 'users_groups' (length=12) 3 => string 'users_metadata' (length=14) 4 => string 'users_scopes' (length=12) 5 => string 'users_sessions' (length=14) 6 => string 'users_sessionscopes' (length=19) /data/www/hosts/fuel/19develop/fuel/app/classes/controller/test.php:23: array (size=7) 0 => string 'users' (length=5) 1 => string 'users_clients' (length=13) 2 => string 'users_groups' (length=12) 3 => string 'users_metadata' (length=14) 4 => string 'users_scopes' (length=12) 5 => string 'users_sessions' (length=14) 6 => string 'users_sessionscopes' (length=19) /data/www/hosts/fuel/19develop/fuel/app/classes/controller/test.php:23: array (size=1) 0 => string 'users' (length=5) /data/www/hosts/fuel/19develop/fuel/app/classes/controller/test.php:28: array (size=1) 0 => array (size=1) 'username' => string 'WanWizard' (length=9) /data/www/hosts/fuel/19develop/fuel/app/classes/controller/test.php:28: array (size=1) 0 => array (size=1) 'username' => string 'WanWizard' (length=9) /data/www/hosts/fuel/19develop/fuel/app/classes/controller/test.php:28: array (size=1) 0 => array (size=1) 'username' => string 'admin' (length=5)