Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Latest commit

 

History

History
45 lines (39 loc) · 1.09 KB

README.md

File metadata and controls

45 lines (39 loc) · 1.09 KB

Dataman

Dataman is a simple database manager using PDO that simplifies back-end processing and grants with useful tools.

Instructions

  • Go to the root of your php project and git clone https://github.com/Apter-X/dataman.git.
  • Configure the connection with your database here ./database/myConfig.

How to use

  include_once './dataman/config.php';
  $dataman = new Dataman;
  $dataman->ping();

Example

Let's pretend that table represents our datatable.

users

id username is_admin
1 steave 0
2 pyck 0
3 bishop 1

With this method we can get a specific row in a table as an associative array :

  $data = $dataman->selectRow('users', 'id', '3');
  $dataman->displayRow($data);

Output:

id username is_admin
3 bishop 1

With this method we can get a specific value in a table as a string :

  $data = $dataman->selectValue('users', 'username','is_admin', '1');
  echo $data;

Output: bishop


License

Under GNU General Public License v3.0.