0

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?

1 Answer 1

1

You can call

Yii::$app->db->getDriverName();

to get the name of the current DB driver.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.