Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
slvler committed Oct 20, 2024
1 parent 6b62c9e commit a7a36c6
Showing 1 changed file with 7 additions and 69 deletions.
76 changes: 7 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,33 @@
# slvler - php-mysql-connectors
# php-mysql-connectors

[![tests](https://github.com/slvler/php-mysql-connectors/actions/workflows/tests.yml/badge.svg)](https://github.com/slvler/php-mysql-connectors)
[![Latest Stable Version](http://poser.pugx.org/slvler/mysql-connectors/v)](https://packagist.org/packages/slvler/mysql-connectors)
[![Latest Unstable Version](http://poser.pugx.org/slvler/mysql-connectors/v/unstable)](https://packagist.org/packages/slvler/mysql-connectors)
[![License](http://poser.pugx.org/slvler/mysql-connectors/license)](https://packagist.org/packages/slvler/mysql-connectors)

[![Latest Stable Version](https://poser.pugx.org/slvler/mysql-connectors/v)](https://packagist.org/packages/slvler/mysql-connectors)
[![Latest Unstable Version](https://poser.pugx.org/slvler/mysql-connectors/v/unstable)](https://packagist.org/packages/slvler/mysql-connectors)
[![License](https://poser.pugx.org/slvler/mysql-connectors/license)](https://packagist.org/packages/slvler/mysql-connectors)
[![Total Downloads](https://poser.pugx.org/slvler/mysql-connectors/downloads)](https://packagist.org/packages/slvler/mysql-connectors)

Mysql driver development that can be used on the php side


## Installation

To install this package tou can use composer:

```bash
composer require slvler/mysql-connectors
composer require slvler/mysql-connectors
```

## Usage

```php

use slvler\mysqlconnectors\Constant;
use slvler\mysqlconnectors\Config\Method;
use slvler\mysqlconnectors\Database\DatabaseController;


$Constant = new Constant();

$db = new DatabaseController($Constant->showDBHost(), $Constant->showDBName(), $Constant->showDBUser(), $Constant->showDBPassword(), $Constant->showConnection());

```



Basic Table // use northwind
------------

Expand All @@ -49,7 +43,6 @@ Basic Table // use northwind




#### Insert Method (TableName, Data = array()):

TableName, Data:
Expand All @@ -64,21 +57,12 @@ $data = Array
"ShipCity" => "UK"
);
```


### Insert Method


```php

$methodInsert = $method->Insert($tableName,$data);

```

#### Update Method (TableName, Id = array() , Data = array()):

TableName, Id , Data:

```php
$tableName = "Orders";

Expand All @@ -95,15 +79,11 @@ $data = Array
```

### Update Method

```php

$methodUpdate = $method->Update($tableName', $id, $data);

```

### Delete Method (TableName, Id = array()):

TableName, Id:

```php
Expand All @@ -114,38 +94,20 @@ $Id = array(
);

```

### Delete Method

```php

$methodDelete = $method->Delete($tableName,$id);

```



### Select_all Method (TableName):

TableName:

```php
$tableName = "Orders";
```

### Select_all Method

```php

$methodSelectAll = $method->Select_all($tableName);

```




### Select_ch Method (TableName, Data = array()):

TableName, Data:

```php
Expand All @@ -157,62 +119,38 @@ $data = Array
);

```

### Select_ch Method

```php

$methodSelectCh = $method->Select_ch($tableName,$data);

```


#### Select_wh Method (TableName, Data = array(), Conn = array(), If = array()):

TableName, Data, Conn, If:

```php
$tableName = "Orders";

$data = Array
(
"EmployeeID" => "4"
);

$conn = Array
(
"!="
);

$if = Array
(
"AND"
);

```


### Select_wh Method

```php

$methodSelectWh = $method->Select_wh($tableName, $data, $conn, $if);

```



### Testing

```bash
vendor\bin\phpunit
```

## Credits

- [slvler](https://github.com/slvler)

- [slvler](https://github.com/slvler)

## License

The MIT License (MIT). Please see [License File](https://github.com/slvler/slvler/blob/main/LICENSE.md) for more information.

0 comments on commit a7a36c6

Please sign in to comment.