frobou/frobou-db-connect
Composer 安装命令:
composer require frobou/frobou-db-connect
包简介
Frobou PDO based Connection
README 文档
README
usage:
$config = new FrobouPdoConfig(json_decode(file_get_contents(__DIR__ . '/database.json')), true);
$this->con = new FrobouPdoConnection($config, true, $log);
//$ConnectionObject->action($query, 'table1 name (empty for default)');
$query = 'SELECT * FROM table1 limit 1';
$this->con->select($query, 'table1');
$query = 'SELECT * FROM table_default limit 1';
$this->con->select($query);
FrobouPdoConnection has transaction support
$this->con->beginTransaction();
$this->con->beginTransaction('table1');
$this->con->beginTransaction('table2');
$query = 'What INTO table (bla-bla-bla) VALUES (bla-bla-bla)';
$this->con->insert($query);
$this->con->update($query, 'table1');
$this->con->delete($query, 'table2');
if (!$this->con->commit()){
$this->con->rollback();
}
$this->con->commit('radius');
$this->con->commit('postfix');
统计信息
- 总下载量: 295
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-25