artemmelnik / devstart-db
Installs: 42
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 0
Forks: 1
Open Issues: 0
pkg:composer/artemmelnik/devstart-db
This package is not auto-updated.
Last update: 2025-10-08 00:24:22 UTC
README
- Install
composer require artemmelnik/devstart-db
- Use
Select
<?php require_once __DIR__ . '/vendor/autoload.php'; use DevStart\Database; $db = new Database([ 'host' => 'localhost', 'dbname' => 'devstart_db', 'user' => 'root', 'password' => 'root', 'charset' => 'utf8' ]); $query = $db->query('SELECT * FROM posts ORDER BY id DESC'); $db->closeConnection();
###Insert
<?php $insert = $db->query("INSERT INTO posts (title, content) VALUES (:title, :content)", [ 'title' => 'Hello World', 'content' => 'Wrire content' ]);