techone/database
最新稳定版本:v2.0.0
Composer 安装命令:
composer require techone/database
包简介
PDO database library
关键字:
README 文档
README
PDO database library for PHP.
the current supported databases are:
| type | database |
|---|---|
| mysql | MySQL |
| pgsql | PostgreSQL |
| sqlite | SQLite |
| sqlsrv | SqlServer |
Installation
Use Composer
composer require leeqvip/database
Usage
require_once './vendor/autoload.php'; use Leeqvip\Database\Manager; $config = [ 'type' => 'mysql', // mysql,pgsql,sqlite,sqlsrv 'hostname' => '127.0.0.1', 'database' => 'test', 'username' => 'root', 'password' => 'abc-123', 'hostport' => '3306', ]; $manager = new Manager($config); $connection = $manager->getConnection(); $connection->query('SELECT * FROM `users` WHERE `id` = :id', ['id' => 1]); $connection->execute('UPDATE `users` SET `name` = "joker" where `id` = :id', ['id' => 1]);
License
This project is licensed under the Apache 2.0 license.
统计信息
- 总下载量: 52.19k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2018-10-16