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.

1
2
3
4
5
6
7
8
9
10
11
12
13
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
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.