mocodo/sql
Composer 安装命令:
composer require mocodo/sql
包简介
README 文档
README
Provides a small extension to the native PDO behavior, allowing simple query build.
Installation
$ composer require mocodo/sql
Tests
$ composer tests
Usage
As it is simply extending PDO, you can instanciate it like so :
<?php use Mocodo\Driver\MySQLConnection $pdo = new MySQLConnection('mysql:127.0.0.1;dbname=test', 'root', 'root', [...]);
It also comes with a neat feature for building queries.
$query = 'SELECT foo, bar FROM my_table WHERE 1'; $stmt = $pdo->find($query, [ 'conditions' => [ 'foo' => 'foobar', 'bar LIKE' => '%.com', ] ]); // SELECT foo, bar FROM my_table WHERE 1 AND foo = 'foobar' AND bar LIKE '%.com'
License
MIT
统计信息
- 总下载量: 43
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-05