Simpel class for PDO beginners. The basic PDO features are Available in this class.
Setup Config
Fill the yaml file as the config example.
```yaml
name:
database_host: localhost
database_name: dbname
database_user: root
database_password: password
```
The name is the handle name to call the connection.
Setup
* Run composer update to fetch the yaml class.
* include the vendor/autoload.php in your php file.
New php classes and files
When you extend this project in your own. Update the psr-4 piece in the composer.json file.
After updating and giving the namespaces run ```composer dump-autoload``` to update the autoloader files.
Create connection
```php
$database = new Database('handlename');
```
The connection is setup according to the handle name given with the variables in the config file.
Select one line from database
```php
$query = 'SELECT * FROM `table` WHERE `name`=:name LIMIT 1';