1- # slvler - php-mysql-connectors
1+ # php-mysql-connectors
22
33[ ![ tests] ( https://github.com/slvler/php-mysql-connectors/actions/workflows/tests.yml/badge.svg )] ( https://github.com/slvler/php-mysql-connectors )
4- [ ![ Latest Stable Version] ( http ://poser.pugx.org/slvler/mysql-connectors/v)] ( https://packagist.org/packages/slvler/mysql-connectors )
5- [ ![ Latest Unstable Version] ( http ://poser.pugx.org/slvler/mysql-connectors/v/unstable)] ( https://packagist.org/packages/slvler/mysql-connectors )
6- [ ![ License] ( http ://poser.pugx.org/slvler/mysql-connectors/license)] ( https://packagist.org/packages/slvler/mysql-connectors )
7-
4+ [ ![ Latest Stable Version] ( https ://poser.pugx.org/slvler/mysql-connectors/v)] ( https://packagist.org/packages/slvler/mysql-connectors )
5+ [ ![ Latest Unstable Version] ( https ://poser.pugx.org/slvler/mysql-connectors/v/unstable)] ( https://packagist.org/packages/slvler/mysql-connectors )
6+ [ ![ License] ( https ://poser.pugx.org/slvler/mysql-connectors/license)] ( https://packagist.org/packages/slvler/mysql-connectors )
7+ [ ![ Total Downloads ] ( https://poser.pugx.org/slvler/mysql-connectors/downloads )] ( https://packagist.org/packages/slvler/mysql-connectors )
88
99Mysql driver development that can be used on the php side
1010
11-
1211## Installation
1312
1413To install this package tou can use composer:
1514
1615``` bash
17- composer require slvler/mysql-connectors
16+ composer require slvler/mysql-connectors
1817```
19-
2018## Usage
2119
2220``` php
23-
2421use slvler\mysqlconnectors\Constant;
2522use slvler\mysqlconnectors\Config\Method;
2623use slvler\mysqlconnectors\Database\DatabaseController;
2724
28-
2925$Constant = new Constant();
3026
3127$db = new DatabaseController($Constant->showDBHost(), $Constant->showDBName(), $Constant->showDBUser(), $Constant->showDBPassword(), $Constant->showConnection());
3228
3329```
3430
35-
36-
3731Basic Table // use northwind
3832------------
3933
@@ -49,7 +43,6 @@ Basic Table // use northwind
4943
5044
5145
52-
5346#### Insert Method (TableName, Data = array()):
5447
5548TableName, Data:
@@ -64,21 +57,12 @@ $data = Array
6457 "ShipCity" => "UK"
6558);
6659```
67-
68-
6960### Insert Method
70-
71-
7261``` php
73-
7462$methodInsert = $method->Insert($tableName,$data);
75-
7663```
77-
7864#### Update Method (TableName, Id = array() , Data = array()):
79-
8065TableName, Id , Data:
81-
8266``` php
8367$tableName = "Orders";
8468
@@ -95,15 +79,11 @@ $data = Array
9579```
9680
9781### Update Method
98-
9982``` php
100-
10183$methodUpdate = $method->Update($tableName', $id, $data);
102-
10384```
10485
10586### Delete Method (TableName, Id = array()):
106-
10787TableName, Id:
10888
10989``` php
@@ -114,38 +94,20 @@ $Id = array(
11494);
11595
11696```
117-
11897### Delete Method
119-
12098``` php
121-
12299$methodDelete = $method->Delete($tableName,$id);
123-
124100```
125-
126-
127-
128101### Select_all Method (TableName):
129-
130102TableName:
131-
132103``` php
133104$tableName = "Orders";
134105```
135-
136106### Select_all Method
137-
138107``` php
139-
140108$methodSelectAll = $method->Select_all($tableName);
141-
142109```
143-
144-
145-
146-
147110### Select_ch Method (TableName, Data = array()):
148-
149111TableName, Data:
150112
151113``` php
@@ -157,62 +119,38 @@ $data = Array
157119);
158120
159121```
160-
161122### Select_ch Method
162-
163123``` php
164-
165124$methodSelectCh = $method->Select_ch($tableName,$data);
166-
167125```
168-
169-
170126#### Select_wh Method (TableName, Data = array(), Conn = array(), If = array()):
171-
172127TableName, Data, Conn, If:
173-
174128``` php
175129$tableName = "Orders";
176-
177130$data = Array
178131(
179132 "EmployeeID" => "4"
180133);
181-
182134$conn = Array
183135(
184136 "!="
185137);
186-
187138$if = Array
188139(
189140 "AND"
190141);
191-
192142```
193-
194-
195143### Select_wh Method
196-
197144``` php
198-
199145$methodSelectWh = $method->Select_wh($tableName, $data, $conn, $if);
200-
201146```
202-
203-
204-
205147### Testing
206148
207149``` bash
208150vendor\b in\p hpunit
209151```
210-
211152## Credits
212-
213- - [ slvler] ( https://github.com/slvler )
214-
153+ - [ slvler] ( https://github.com/slvler )
215154
216155## License
217-
218156The MIT License (MIT). Please see [ License File] ( https://github.com/slvler/slvler/blob/main/LICENSE.md ) for more information.
0 commit comments