izniburak / pdox
有用的查询构建器和PDO类,用于PHP。简单访问您的SQL记录。
v1.6.0
2021-09-20 20:24 UTC
Requires
- php: >=5.5
- ext-json: *
- ext-pdo: *
README
_____ _____ ____
| __ \| __ \ / __ \
| |__) | | | | | | |_ __
| ___/| | | | | | \ \/ /
| | | |__| | |__| |> <
|_| |_____/ \____//_/\_\
快速、高效且有用的查询构建器和PDO类,适用于#PHP
安装
composer.json文件
{ "require": { "izniburak/pdox": "^1" } }
运行安装命令后。
$ composer install
或者直接运行以下命令。
$ composer require izniburak/pdox
示例用法
require 'vendor/autoload.php'; $config = [ 'host' => 'localhost', 'driver' => 'mysql', 'database' => 'test', 'username' => 'root', 'password' => '', 'charset' => 'utf8', 'collation' => 'utf8_general_ci', 'prefix' => '' ]; $db = new \Buki\Pdox($config); $records = $db->table('users') ->select('id, name, surname, age') ->where('age', '>', 18) ->orderBy('id', 'desc') ->limit(20) ->getAll(); var_dump($records);
文档
文档页面:PDOx 文档
支持
许可
贡献
- 将其Fork(https://github.com/izniburak/pdox/fork)
- 创建您的功能分支(git checkout -b my-new-feature)
- 提交您的更改(git commit -am '添加一些功能')
- 将更改推送到分支(git push origin my-new-feature)
- 创建新的Pull Request