Switch to a different database.
DB::useDB('my_other_database');
Get an array of the tables in the requested database. If no database is specified, use the current database.
$current_db_tables = DB::tableList();
$other_db_tables = DB::tableList('other_db');
foreach ($other_db_tables as $table) {
echo "Table Name: $table\n";
}
Get an array of the columns in the requested table in the current database.
$columns = DB::columnList('accounts');
foreach ($columns as $column) {
echo "Column: $column\n";
}
Drop any existing MySQL connections. If you run a query after this, it will automatically reconnect.
DB::disconnect(); // drop mysqli connection
Return the underlying mysqli object.
$mysqli = DB::get();