PHPackages                             reymark/database - 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. reymark/database

ActiveLibrary

reymark/database
================

A lightweight hybrid database handler for PHP using PDO, with PicoDB-style syntax and legacy static query support.

v0.0.2(6mo ago)06MITPHPPHP &gt;=7.4

Since Oct 24Pushed 6mo agoCompare

[ Source](https://github.com/Mark6286/phpdb)[ Packagist](https://packagist.org/packages/reymark/database)[ RSS](/packages/reymark-database/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

phpdb
=====

[](#phpdb)

A simple and fast MySQL database library for PHP, by Mark6286.

🧠 What is phpdb?
----------------

[](#-what-is-phpdb)

phpdb is a lightweight PHP library designed to simplify and speed up database querying for MySQL databases. It provides basic functions to connect, query, and fetch results without the overhead of full ORM frameworks.

🎯 Key Features
--------------

[](#-key-features)

- Easy to configure and use: just include the library and setup your credentials.
- Basic CRUD query helpers for rapid development.
- Minimal dependencies — focused on simplicity and performance.
- Compatible with MySQL via PHP mysqli or PDO (depending on implementation).
- Good for small to mid-size PHP projects where an ORM is overkill.

🚀 Getting Started
-----------------

[](#-getting-started)

### 1. Install via Composer

[](#1-install-via-composer)

```
composer require reymark/database
```

### 2. Set up your configuration

[](#2-set-up-your-configuration)

```
require_once 'vendor/autoload.php';

$dbConfig = [
  'host'     => 'localhost',
  'username' => 'your_db_user',
  'password' => 'your_db_pass',
  'database' => 'your_db_name',
];

$db = new \phpdb\Database($dbConfig);
```

### 3. Run queries

[](#3-run-queries)

```
// Simple SELECT
$rows = $db->query("SELECT * FROM users WHERE active = 1");

// Insert
$insertId = $db->insert('users', [
  'name'  => 'John Doe',
  'email' => 'john@example.com'
]);

// Update
$affected = $db->update('users', ['active' => 0], "id = {$insertId}");

// Delete
$deleted = $db->delete('users', "id = {$insertId}");
```

📁 Repository Structure
----------------------

[](#-repository-structure)

```
phpdb/
├── src/              ← Library source code
├── examples/         ← Example usage scripts
├── composer.json     ← Package metadata & dependencies
├── README.md         ← This document
└── LICENSE           ← MIT License

```

🛠️ Why use phpdb?
-----------------

[](#️-why-use-phpdb)

- **Lightweight**: Minimal setup and simple API.
- **Fast**: Less overhead than full-blown ORMs.
- **Flexible**: Use it in small projects, utilities, or as a base for custom DB layers.
- **Open Source**: MIT licensed, feel free to fork, modify or contribute.

🔧 Contributing &amp; Next Steps
-------------------------------

[](#-contributing--next-steps)

- Submit bug reports or feature requests via GitHub Issues.
- Consider adding features like prepared statement support, transaction handling, or support for multiple DB backends (PostgreSQL, SQLite).
- Add unit tests to validate library behavior.
- Document more advanced use-cases (bulk inserts, joins, query builder, etc).

📄 License
---------

[](#-license)

MIT License — see the `LICENSE` file for full terms.

---

**Thank you for using phpdb!**
*Last updated: 2025-11-01*

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance66

Regular maintenance activity

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 57.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

2

Last Release

199d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d6db2570c12ce9a0927ea59a39c70532a557cde9b3f28eacfd529ec6dff3e226?d=identicon)[Mark6286](/maintainers/Mark6286)

---

Top Contributors

[![rmsbal](https://avatars.githubusercontent.com/u/264789888?v=4)](https://github.com/rmsbal "rmsbal (4 commits)")[![Mark6286](https://avatars.githubusercontent.com/u/116934125?v=4)](https://github.com/Mark6286 "Mark6286 (3 commits)")

### Embed Badge

![Health badge](/badges/reymark-database/health.svg)

```
[![Health](https://phpackages.com/badges/reymark-database/health.svg)](https://phpackages.com/packages/reymark-database)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
