Db\Adapter\Pdo::escapeIdentifier

public string escapeIdentifier (string $identifier) Escapes a column/table/schema name $escapedTable = $connection->escapeIdentifier('robots'); $escapedTable = $connection->escapeIdentifier(['store', 'robots']);

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();

Db\Adapter\Pdo::convertBoundParams

public convertBoundParams (mixed $sql, [array $params]) Converts bound parameters such as :name: or ?1 into PDO bind params ? print_r($connection->convertBoundParams('SELECT * FROM robots WHERE name = :name:', array('Bender')));

Db\Adapter\Pdo::executePrepared

public PDOStatement executePrepared (PDOStatement $statement, array $placeholders, array $dataTypes) Executes a prepared statement binding. This function uses integer indexes starting from zero use Phalcon\Db\Column; $statement = $db->prepare('SELECT * FROM robots WHERE name = :name'); $result = $connection->executePrepared($statement, ['name' => 'Voltron'], ['name' => Column::BIND_PARAM_INT]);

Db\Adapter\Pdo

extends abstract class Phalcon\Db\Adapter implements Phalcon\Events\EventsAwareInterface Source on GitHub Phalcon\Db\Adapter\Pdo is the Phalcon\Db that internally uses PDO to connect to a database use Phalcon\Db\Adapter\Pdo\Mysql; $config = [ 'host' => 'localhost', 'dbname' => 'blog', 'port' => 3306, 'username' => 'sigma', 'password' => 'secret' ]; $connection = new Mysql($config); Methods public __construct (array $descriptor) Constructor for Phalc

Db\Adapter\Pdo::close

public close () Closes the active connection returning success. Phalcon automatically closes and destroys active connections when the request ends

Db\Adapter\Pdo::affectedRows

public affectedRows () Returns the number of affected rows by the lastest INSERT/UPDATE/DELETE executed in the database system $connection->execute("DELETE FROM robots"); echo $connection->affectedRows(), ' were deleted';

Db\Adapter\Pdo::begin

public begin ([mixed $nesting]) Starts a transaction in the connection

Db\Adapter\Pdo::commit

public commit ([mixed $nesting]) Commits the active transaction in the connection

Db\AdapterInterface::viewExists

abstract public viewExists (mixed $viewName, [mixed $schemaName]) ...