Browse Source

Merge branch 'feature/PersistenConnections' of https://github.com/Alan01252/FrameworkBenchmarks into Alan01252-feature/PersistenConnections

Patrick Falls 12 years ago
parent
commit
b1392425cf
1 changed files with 5 additions and 5 deletions
  1. 5 5
      php-silex/web/index.php

+ 5 - 5
php-silex/web/index.php

@@ -9,13 +9,13 @@ require_once __DIR__.'/../vendor/autoload.php';
 
 $app = new Silex\Application();
 
+$dbh = new PDO('mysql:host=192.168.100.102;dbname=hello_world', 'benchmarkdbuser', 'benchmarkdbpass', array(
+    PDO::ATTR_PERSISTENT => true
+));
+
 $app->register(new Silex\Provider\DoctrineServiceProvider(), array(
     'db.options' => array(
-        'driver' => 'pdo_mysql',
-        'host' => '192.168.100.102',
-        'dbname' => 'hello_world',
-        'user' => 'benchmarkdbuser',
-        'password' => 'benchmarkdbpass',
+    'pdo' => $dbh
     ),
 ));