开发者

Doctrine using MySQL

I'm looking at some example documentation for Doctrine, and in the example they use SQLite. How would I get it so that it uses MySQL, with host, database, username, and password set?

In the example they use the following code:

// Database connection information
$connectionOptions = array(
    ‘driver’ => 开发者_StackOverflow‘pdo_sqlite’,
    ‘path’ => ‘database.sqlite’
);

$em – EntityManager::create($connectionOptions, $config);

Reference: http://www.slideshare.net/jwage/doctrine-2-not-the-same-old-php-orm


AFAIK Doctrine is using DBAL object as connection in EntityManager. So that should give you an answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜