Skip to content

Instantly share code, notes, and snippets.

@tournasdim
Created April 3, 2014 05:20
Show Gist options
  • Save tournasdim/9948674 to your computer and use it in GitHub Desktop.
Save tournasdim/9948674 to your computer and use it in GitHub Desktop.
Sample Code to connect to the database with doctrine connection
return array (
'Doctrine' => array (
'Connection' => array (
'Orm_ default ' => array (
'DriverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver' ,
'Params' => array (
'Host' => 'localhost' ,
'Port' => '3306 ' ,
'User' => 'root' ,
'Password' => '' ,
'Dbname' => 'zf2essentials' ,
'DriverOptions' => array (
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8' "
)
)
)
)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment