codeboxsql/php
最新稳定版本:v1
Composer 安装命令:
composer require codeboxsql/php
包简介
A PHP Wrapper for the mysqli class
README 文档
README
Wrapper for the PHP MySQLi Extension
Requirements
- PHP ^7.3
Installation
To install with composer run the following command
composer require codeboxsql/php
Usage
//Autoload classes using composer require_once 'vendor/autoload.php'; //OR //Include the classes directly from path require_once 'vendor/codeboxsql/php/dist/mysql.php'; $host = 'localhost'; $user = 'root'; $pass = ''; $database = 'test'; $mysqli = new codeboxsql\mysql($host, $user, $pass, $database); //INSERT $mysqli->insertInto('tableOne',array('name' => 'lolo' , 'deg' => '100')); //return string //SELECT //Single Select $mysqli->singleSelect('accounts',array('id' => '60' , 'mobile' => '+2348023775657'), 'fetch', array('ORDER BY' => 'rand()' , 'LIMIT' => '3')); //return array $mysqli->singleSelect('accounts',array('id' => '60' , 'mobile' => '+2348023775657'), 'count', array('ORDER BY' => 'rand()' , 'LIMIT' => '3')); //return string //multi Select $mysqli->multiSelect(array('accounts' => 'a' , 'bvn' => 'b'),array('a.id' => '60' , 'b.usrID' => '60'), 'fetch', array('ORDER BY' => 'rand()' , 'LIMIT' => '3'));// return array //$mysqli->multiSelect(array('accounts' => 'a' , 'bvn' => 'b'),array('a.id' => '60' , 'b.usrID' => '60'), 'count', array('ORDER BY' => 'rand()' , 'LIMIT' => '3')); //return string
Examples
Look to the scripts in the examples.php file in your browser.
Contributing
If you encounter a bug or have a suggestion to help improve this liobrary for others, you are welcome to open a Github issue on this repository and it will be reviewed by our development team.
License
MIT - see LICENSE
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-04-09