有用的查询构建器和PDO类,用于PHP。简单访问您的SQL记录。

v1.6.0 2021-09-20 20:24 UTC

This package is auto-updated.

Last update: 2024-09-19 02:17:21 UTC


README

 _____  _____   ____       
 |  __ \|  __ \ / __ \      
 | |__) | |  | | |  | |_  __
 |  ___/| |  | | |  | \ \/ /
 | |    | |__| | |__| |>  <
 |_|    |_____/ \____//_/\_\

快速、高效且有用的查询构建器和PDO类,适用于#PHP

Total Downloads Latest Stable Version Latest Unstable Version License

安装

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 文档

支持

izniburak的主页

izniburak的twitter

许可

MIT 许可

贡献

  1. 将其Fork(https://github.com/izniburak/pdox/fork
  2. 创建您的功能分支(git checkout -b my-new-feature)
  3. 提交您的更改(git commit -am '添加一些功能')
  4. 将更改推送到分支(git push origin my-new-feature)
  5. 创建新的Pull Request

贡献者