mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-05-15 12:37:34 +08:00
DBPdo instead of DBMysqli
This commit is contained in:
@@ -622,10 +622,11 @@ function last_query($all = false, $format = 'json')
|
||||
{
|
||||
static $connection;
|
||||
if (is_null($connection)) {
|
||||
$connectionName = \Nexus\Database\NexusDB::getConnectionName();
|
||||
if (IN_NEXUS) {
|
||||
$connection = \Illuminate\Database\Capsule\Manager::connection(\Nexus\Database\NexusDB::ELOQUENT_CONNECTION_NAME);
|
||||
$connection = \Illuminate\Database\Capsule\Manager::connection($connectionName);
|
||||
} else {
|
||||
$connection = \Illuminate\Support\Facades\DB::connection(config('database.default'));
|
||||
$connection = \Illuminate\Support\Facades\DB::connection($connectionName);
|
||||
}
|
||||
}
|
||||
if ($all === 'COUNT') {
|
||||
|
||||
Reference in New Issue
Block a user