erebos / dataman
Dataman is a simple database manager using PDO that simplifies back-end processing and grants with useful tools.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/erebos/dataman
Requires
- php: >=7.4
This package is auto-updated.
Last update: 2022-11-20 23:22:06 UTC
README
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.