Skip to content

Commit 2c61b8e

Browse files
Add files via upload
1 parent 890128c commit 2c61b8e

3 files changed

Lines changed: 83 additions & 1 deletion

File tree

README.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,48 @@
1-
# codeboxsql
1+
# a3pay-php
2+
PHP library for a3Pay
3+
4+
5+
## Requirements
6+
* PHP ^7.3
7+
8+
9+
## Installation
10+
To install with composer run the following command
11+
12+
composer require a3pay/php
13+
14+
15+
## Usage
16+
```php
17+
18+
//Autoload classes using composer
19+
require_once 'vendor/autoload.php';
20+
//OR
21+
//Include the classes directly from path
22+
require_once 'vendor/a3pay/php/dist/payments.php';
23+
24+
//mysqli USAGE
25+
//INSERT
26+
$mysqli->insertInto('tableOne',array('name' => 'lolo' , 'deg' => '100')); //return string
27+
//SELECT
28+
//Single Select
29+
$mysqli->singleSelect('accounts',array('id' => '60' , 'mobile' => '+2348023775657'), 'fetch', array('ORDER BY' => 'rand()' , 'LIMIT' => '3')); //return array
30+
$mysqli->singleSelect('accounts',array('id' => '60' , 'mobile' => '+2348023775657'), 'count', array('ORDER BY' => 'rand()' , 'LIMIT' => '3')); //return string
31+
//multi Select
32+
$mysqli->multiSelect(array('accounts' => 'a' , 'bvn' => 'b'),array('a.id' => '60' , 'b.usrID' => '60'), 'fetch', array('ORDER BY' => 'rand()' , 'LIMIT' => '3'));// return array
33+
//$mysqli->multiSelect(array('accounts' => 'a' , 'bvn' => 'b'),array('a.id' => '60' , 'b.usrID' => '60'), 'count', array('ORDER BY' => 'rand()' , 'LIMIT' => '3')); //return string
34+
35+
```
36+
37+
38+
## Examples
39+
Look to the scripts in the `/examples` directory in your browser. You will have to change the api_key and token in the example files to your own.
40+
41+
42+
## Contributing
43+
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.
44+
45+
46+
## License
47+
MIT - see LICENSE
48+

composer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "codeboxsql/php",
3+
"description": "A PHP Wrapper for the mysqli class",
4+
"type": "library",
5+
"autoload": {
6+
"psr-4": {
7+
"codeboxsql\\": "dist/"
8+
}
9+
},
10+
"require": {
11+
"php": "^7.3|^8.0"
12+
},
13+
"license": "MIT",
14+
"authors": [
15+
{
16+
"name": "CodeBox NG",
17+
"email": "contact@codebox.ng"
18+
}
19+
],
20+
"minimum-stability": "dev",
21+
"prefer-stable": true
22+
}
23+

example.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
require_once 'vendor/autoload.php';
3+
4+
$host = 'localhost';
5+
$user = 'root';
6+
$pass = '';
7+
$database = 'mailer';
8+
9+
$mysqli = new codeboxsql\mysql($host, $user, $pass, $database);
10+
11+
print_r($mysqli->singleSelect('logs','', 'fetch', ''));
12+

0 commit comments

Comments
 (0)