PHPackages                             spaniakos/simple-php-db-wrapper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. spaniakos/simple-php-db-wrapper

ActiveLibrary[Database &amp; ORM](/categories/database)

spaniakos/simple-php-db-wrapper
===============================

A simple PDO database Wrapper

21PHP

Since Nov 1Pushed 2y ago1 watchersCompare

[ Source](https://github.com/spaniakos/Simple-PHP-DB-Wrapper)[ Packagist](https://packagist.org/packages/spaniakos/simple-php-db-wrapper)[ RSS](/packages/spaniakos-simple-php-db-wrapper/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

This is a very simple Database wrapper for PHP and mysql to get you started Simple and lightwait, makes it ideal for quick projects.

You can Import via

```
composer require spaniakos/simple-php-db-wrapper

```

DO NOT FORGET TO ADD A .env to your project OR add this to your .env

```
DEBUG=false
DB_HOST="localhost"
DB_USER="root"
DB_PASS="toor"
DB_NAME="test_database"
DB_PORT=3306
DB_CHARSET="utf8mb4"
DB_COLLATION="utf8mb4_general_ci"
LOG_PATH="path of log file with proper permissions"

```

Below are the test config for the tests:

```
DB_CHARSET="utf8mb4"
DB_COLLATION="utf8mb4_general_ci"

```

Please do change the above to your desired valued

Then on your script you need to require vendor autoload IF you havent already somewhere: require\_once 'vendor/autoload.php';

and then you can use the library by using the above line

use Spaniakos\\SimplePhpDbWrapper;

Sample usage on a class:

```
