Browse Source

Use persistent db connections in plain php (#3656)

Michael Hixson 7 years ago
parent
commit
ea11cdda10
1 changed files with 1 additions and 0 deletions
  1. 1 0
      frameworks/PHP/php/dborm.php

+ 1 - 0
frameworks/PHP/php/dborm.php

@@ -9,6 +9,7 @@ header("Content-type: application/json");
 # inclue the ActiveRecord library
 # inclue the ActiveRecord library
 require_once 'vendor/php-activerecord/php-activerecord/ActiveRecord.php';
 require_once 'vendor/php-activerecord/php-activerecord/ActiveRecord.php';
 
 
+ActiveRecord\Connection::$PDO_OPTIONS[PDO::ATTR_PERSISTENT] = true;
 ActiveRecord\Config::initialize(function($cfg)
 ActiveRecord\Config::initialize(function($cfg)
 {
 {
   $cfg->set_model_directory('models');
   $cfg->set_model_directory('models');