Skip to content

Instantly share code, notes, and snippets.

@n0m4dz
n0m4dz / Database.php
Last active September 29, 2022 11:27
PHP PDO database CRUD class
<?php
class Database extends PDO
{
public function __construct($DB_TYPE, $DB_HOST, $DB_NAME, $DB_USER, $DB_PASS)
{
parent::__construct($DB_TYPE.':host='.$DB_HOST.';dbname='.$DB_NAME, $DB_USER, $DB_PASS);
}