Reputation: 423
In my project I want to make utility class for different databases (MySQL, Oracle). How can I determine what db type is using in current \Yii::$app->db object?
Upvotes: 0
Views: 444
Reputation: 18021
You can call
Yii::$app->db->getDriverName();
to get the name of the current DB driver.
Upvotes: 1