Mysql driver development that can be used on the php side
MIT License
Mysql driver development that can be used on the php side
To install this package tou can use composer:
composer require slvler/mysql-connectors
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());
OrderID | EmployeeID | ShipName |
---|---|---|
10249 | 6 | red |
10250 | 4 | yellow |
10251 | 3 | green |
10252 | 4 | yellow |
10253 | 3 | red |
TableName, Data:
$tableName = "Orders";
$data = Array
(
"ShipName" => "Blue",
"ShipAddress" => "Nottingham",
"ShipCity" => "UK"
);
$methodInsert = $method->Insert($tableName,$data);
TableName, Id , Data:
$tableName = "Orders";
$Id = array(
"OrderID" => "1"
);
$data = Array
(
"ShipName" => "Blue",
"ShipAddress" => "Nottingham",
"ShipCity" => "UK"
);
$methodUpdate = $method->Update($tableName', $id, $data);
TableName, Id:
$tableName = "Orders";
$Id = array(
"OrderID" => "1"
);
$methodDelete = $method->Delete($tableName,$id);
TableName:
$tableName = "Orders";
$methodSelectAll = $method->Select_all($tableName);
TableName, Data:
$tableName = "Orders";
$data = Array
(
"ShipName", "ShipAddress", "ShipCity"
);
$methodSelectCh = $method->Select_ch($tableName,$data);
TableName, Data, Conn, If:
$tableName = "Orders";
$data = Array
(
"EmployeeID" => "4"
);
$conn = Array
(
"!="
);
$if = Array
(
"AND"
);
$methodSelectWh = $method->Select_wh($tableName, $data, $conn, $if);
vendor\bin\phpunit
The MIT License (MIT). Please see License File for more information.