1
0
mirror of synced 2024-12-15 15:46:02 +03:00
doctrine2/manual/codes/Basic Components - DB - Connecting to a database.php

12 lines
271 B
PHP

<?php
// using PDO dsn for connecting sqlite memory table
$dbh = Doctrine_DB::getConnection('sqlite::memory:');
// using PEAR like dsn for connecting mysql database
$dsn = 'mysql://root:password@localhost/test';
$dbh = Doctrine_DB::getConnection($dsn);
?>