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. [Database &amp; ORM](/categories/database)
4. /
5. reymark/database

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

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

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

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

Since Oct 24Pushed 8mo agoCompare

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

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

26

—

LowBetter than 41% of packages

Maintenance61

Regular maintenance activity

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity27

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

245d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/116934125?v=4)[Mark](/maintainers/Mark6286)[@Mark6286](https://github.com/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)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M118](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198741.5k12](/packages/pgvector-pgvector)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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