Db\Adapter\Pdo::connect

public connect ([array $descriptor])

This method is automatically called in \Phalcon\Db\Adapter\Pdo constructor. Call it when you need to restore a database connection.

use Phalcon\Db\Adapter\Pdo\Mysql;

 // Make a connection
 $connection = new Mysql([
  'host'     => 'localhost',
  'username' => 'sigma',
  'password' => 'secret',
  'dbname'   => 'blog',
  'port'     => 3306,
 ]);

 // Reconnect
 $connection->connect();
doc_Phalcon
2016-10-16 09:49:06
Comments
Leave a Comment

Please login to continue.