decaldaswcl/php_database-manager
Composer 安装命令:
composer require decaldaswcl/php_database-manager
包简介
Set of SQL language commands that are used to retrieve, add, remove and modify information within a database
README 文档
README
PHP_Database-Manager Set of SQL language commands that are used to retrieve, add, remove and modify information within a database.
Requeriments
PHP_Database-Manager requires PHP version 7.3 or greater.
Installation
Composer
If you use Composer, you can install PHP_DatabaseManager system-wide with the following command:
composer global require "decaldaswcl/PHP_database-manager"
Or alternatively, include a dependency for decaldaswcl/PHP_database-manager in your composer.json file. For example:
{
"require-dev": {
"decaldaswcl/PHP_database-manager": "1.0.*"
}
}
Getting Started
How to include the class in your project
<?php require 'vendor/autoload.php'; use decaldaswcl\DatabaseManager\Database;
Configuring the class and instantiating
Database::config('LocalHost','dataBase','user','pass','port'); $object = new Database('tableName');
Using the functions
- Select responsible for executing a query in the database
return object of type PDOStatement
$results = $obDatabase->select('id < 5 ');
- Insert responsible for inserting data into the database
return inserted id
$id = $obDatabase->insert([ 'name' => 'Isac' ]);
- Update responsible for performing updates on the database
return a boolean value
$boolean = $obDatabase->update('id = 1',[ 'age' => '30' ]);
- Delete responsible for deleting database data
return a boolean value
$success = $obDatabase->delete('id = 1');
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-28