Front-end to take request to JDB Core
- PHP > 7.4
- PHP Memcache
- JDB Core Running
- Memcached Server Running
For first initialize the JDB Sock Connection to Memcached Server
use laky64\database\JDBI;
include 'vendor/autoload.php';
$JDBI = new JDBI('ip_memcached_server', 'port_memcached_server'); //Start Connection
...
$JDBI -> close(); //Close connection
Show processlist, return array on success and null on failure
...
$JDBI->query('SHOW PROCESSLIST;');
...
For make database, return true on success and false on failure
...
$JDBI->query('CREATE DATABASE `database_name` PASSWORD `database_password`;');
...
For drop database, return true on success and false on failure
...
$JDBI->query('DROP DATABASE `database_name`;');
...
For connect to database, return true on success and false on failure
...
$JDBI -> connect('database_name','database_password');
...
For make table (Need connection to database), return true on success and false on failure
...
$JDBI->query('CREATE TABLE `table_name` (`column1`, `column2`, `column3`) AS PRIMARY `column1` TYPE `AUTO_INCREMENT`;');
...
...
$JDBI->query('CREATE TABLE `table_name` (`column1`, `column2`, `column3`) AS PRIMARY `column1` TYPE `DEFINED`;');
...
For drop table (Need connection to database), return true on success and false on failure
...
$JDBI->query('DROP TABLE `table_name`;');
...
Show all tables (Need connection to database), return array on success and null on failure
...
$JDBI->query('SHOW TABLES;');
...
Dump Row (Need connection to database), return array on success and null on failure
...
$JDBI->query('SELECT * FROM `table_name`;');
...
Add Column (Need connection to database), return true on success and false on failure
...
$JDBI->query('ALTER TABLE `table_name` ADD COLUMN (`column1`, `column2`);');
...
Add Column (Need connection to database), return true on success and false on failure
...
$JDBI->query('ALTER TABLE `table_name` DROP COLUMN (`column1`, `column2`);');
...
Insert Row (Need connection to database), return true on success and false on failure
...
$JDBI->query('INSERT INTO `table_name` (`column1`, `column2`, `column3`) VALUES (`value1`, `value2`, `value3`);');
...
Insert Row (Need connection to database), return true on success and false on failure
...
$JDBI->query('UPDATE `table_name` SET (`column1`, `column2`) VALUES (`value1`, `value2`) WHERE `column` IS `value`;');
...
Delete Row (Need connection to database), return true on success and false on failure
...
$JDBI->query('DELETE FROM `table_name` WHERE `column` IS `value`;');
...
Dump Row (Need connection to database), return array on success and null on failure
...
$JDBI->query('SELECT * FROM `table_name` WHERE `column` IS `value`;');
...