1
0
mirror of synced 2024-12-14 15:16:04 +03:00
doctrine2/manual/docs/Basic Components - DB - Connecting to a database.php

15 lines
395 B
PHP
Raw Normal View History

<?php
2006-10-19 23:22:10 +04:00
// using PDO like dsn for connecting sqlite memory table
2006-10-19 23:22:10 +04:00
$dbh = Doctrine_DB::getConnection('sqlite::memory:');
// using PDO like dsn for connecting pgsql database
$dbh = Doctrine_DB::getConnection('pgsql://root:password@localhost/mydb');
// using PEAR like dsn for connecting mysql database
2006-10-19 23:22:10 +04:00
$dbh = Doctrine_DB::getConnection('mysql://root:password@localhost/test');
?>