PHPackages                             jdelta/medoo - 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. jdelta/medoo

Abandoned → [jlibs/meddo](/?search=jlibs%2Fmeddo)Framework[Database &amp; ORM](/categories/database)

jdelta/medoo
============

The lightweight PHP database framework to accelerate development

v2.2.0(8mo ago)051MITPHPPHP &gt;=7.3CI passing

Since Apr 28Pushed 8mo agoCompare

[ Source](https://github.com/jaimecx/Medoo)[ Packagist](https://packagist.org/packages/jdelta/medoo)[ Docs](https://medoo.in)[ Fund](https://paypal.me/AngelaonLai)[ Fund](https://opencollective.com/medoo)[ RSS](/packages/jdelta-medoo/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (7)Dependencies (1)Versions (36)Used By (0)

 [![](https://cloud.githubusercontent.com/assets/1467904/19835326/ca62bc36-9ebd-11e6-8b37-7240d76319cd.png)](https://medoo.in)

 [![Build Status](https://github.com/catfan/Medoo/actions/workflows/php.yml/badge.svg)](https://github.com/catfan/Medoo/actions) [![Total Downloads](https://camo.githubusercontent.com/3dce6baaf3cb26a833cb74207d4e5d74fa0cf7616e32c5978cec6b2847c00ff9/68747470733a2f2f706f7365722e707567782e6f72672f63617466616e2f6d65646f6f2f646f776e6c6f616473)](https://packagist.org/packages/catfan/medoo) [![Latest Stable Version](https://camo.githubusercontent.com/291718728d8bb78ec36c6177f5c796f492adc9bd831bc0f4d003069236e2b6c9/68747470733a2f2f706f7365722e707567782e6f72672f63617466616e2f6d65646f6f2f762f737461626c65)](https://packagist.org/packages/catfan/medoo) [![License](https://camo.githubusercontent.com/b5dfa225aabc9f43efb0c3ffdf064f11f1ee28f736bc3d78ec30f7fd25f12408/68747470733a2f2f706f7365722e707567782e6f72672f63617466616e2f6d65646f6f2f6c6963656e7365)](https://packagist.org/packages/catfan/medoo) [![Backers on Open Collective](https://camo.githubusercontent.com/520d95988ba73be643291a4dc3425d0c437587bfa82ac39e242acce4bb256eb3/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f4d65646f6f2f6261636b6572732f62616467652e737667)](https://opencollective.com/medoo) [![Sponsors on Open Collective](https://camo.githubusercontent.com/688f309e2c48706b7a078f51b0ac45fba91680627ba78b16e3cf167c9746f928/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f4d65646f6f2f73706f6e736f72732f62616467652e737667) ](https://opencollective.com/medoo)

> The lightweight PHP database framework to accelerate development.

Features
--------

[](#features)

- **Lightweight** - Single-file framework with minimal dependencies.
- **Easy** - Simple and intuitive API for quick integration.
- **Powerful** - Supports complex SQL queries, data mapping, and SQL injection prevention.
- **Compatible** - Works with MySQL, MariaDB, PostgreSQL, SQLite, MSSQL, Oracle, Sybase, and more.
- **Friendly** - Integrates seamlessly with Laravel, CodeIgniter, Yii, Slim, and other PHP frameworks.
- **Free** - Licensed under MIT, free to use for any purpose.

Jlibs Fork Notes
----------------

[](#jlibs-fork-notes)

This repository is a fork of [Medoo](https://github.com/catfan/Medoo), maintained under the `Jlibs` namespace.
It includes the following modifications:

- **Added support for raw objects in JOIN statements** for more flexible query building.
- **Namespace updated to `Jlibs\Medoo`** to avoid conflicts with the original Medoo package.

All other features and APIs remain compatible with the original Medoo.
You can use this fork as a drop-in replacement if you need the new JOIN handling capability.

Requirements
------------

[](#requirements)

- PHP 7.3 or later
- PDO extension enabled

Get Started
-----------

[](#get-started)

### Install via composer

[](#install-via-composer)

Add Medoo to the `composer.json` configuration file.

```
$ composer require catfan/medoo
```

Then update Composer

```
$ composer update
```

```
// Require Composer's autoloader
require 'vendor/autoload.php';

// Import Medoo namespace
use Jlibs\Medoo;

// Initialize database connection
$database = new Medoo([
    'type' => 'mysql',
    'host' => 'localhost',
    'database' => 'name',
    'username' => 'your_username',
    'password' => 'your_password'
]);

// Insert data
$database->insert('account', [
    'user_name' => 'foo',
    'email' => 'foo@bar.com'
]);

// Retrieve data
$data = $database->select('account', [
    'user_name',
    'email'
], [
    'user_id' => 50
]);

echo json_encode($data);

// [{
//    "user_name" : "foo",
//    "email" : "foo@bar.com",
// }]
```

Contribution Guidelines
-----------------------

[](#contribution-guidelines)

Before submitting a pull request, ensure compatibility with multiple database engines and include unit tests when possible.

### Testing &amp; Code Style

[](#testing--code-style)

- Run `phpunit tests` to execute unit tests.
- Use `php-cs-fixer fix` to enforce code style consistency.

### Commit Message Format

[](#commit-message-format)

Each commit should begin with a tag indicating the type of change:

- `[fix]` for bug fixes
- `[feature]` for new features
- `[update]` for improvements

Keep contributions simple and well-documented.

License
-------

[](#license)

Medoo is released under the MIT License.

Links
-----

[](#links)

- Official website:
- Documentation:
- Twitter:
- Open Collective:

Support Our Other Product
-------------------------

[](#support-our-other-product)

[Gear Browser - Web Browser for Geek](https://gear4.app)

[![Gear Browser](https://private-user-images.githubusercontent.com/1467904/300354811-bc5059d4-6a2d-4bbf-90d9-a9f71bae3335.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUwNTg5NDUsIm5iZiI6MTc3NTA1ODY0NSwicGF0aCI6Ii8xNDY3OTA0LzMwMDM1NDgxMS1iYzUwNTlkNC02YTJkLTRiYmYtOTBkOS1hOWY3MWJhZTMzMzUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDQwMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA0MDFUMTU1MDQ1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZmRkZTE1ODlkNmQ5ODdkY2QzNmRjYTlmYzM1NGVkYWZhNTgyZDg5ZmU0ZjQzNWYzMjZlYjNlOTMwNjY2MzRlZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Zr0V3cKEaPnFFQJv7LgH_vgA9mXPnInHeql8dM8-ZT4)](https://gear4.app)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance59

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 69.5% 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 ~129 days

Recently: every ~627 days

Total

33

Last Release

266d ago

Major Versions

v0.9.8 → v1.02015-10-05

v1.5.6.3 → v2.1.102023-06-25

PHP version history (3 changes)v0.9.5.3PHP &gt;=5.1

v1.2PHP &gt;=5.4

v2.1.10PHP &gt;=7.3

### Community

Maintainers

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

---

Top Contributors

[![catfan](https://avatars.githubusercontent.com/u/1467904?v=4)](https://github.com/catfan "catfan (477 commits)")[![Angelaon](https://avatars.githubusercontent.com/u/13937887?v=4)](https://github.com/Angelaon "Angelaon (183 commits)")[![qatrix](https://avatars.githubusercontent.com/u/1537121?v=4)](https://github.com/qatrix "qatrix (5 commits)")[![jaimecx](https://avatars.githubusercontent.com/u/37024829?v=4)](https://github.com/jaimecx "jaimecx (5 commits)")[![IfnotFr](https://avatars.githubusercontent.com/u/1242308?v=4)](https://github.com/IfnotFr "IfnotFr (3 commits)")[![utopiaio](https://avatars.githubusercontent.com/u/2365328?v=4)](https://github.com/utopiaio "utopiaio (2 commits)")[![indiwine](https://avatars.githubusercontent.com/u/5175217?v=4)](https://github.com/indiwine "indiwine (2 commits)")[![jackled](https://avatars.githubusercontent.com/u/2091208?v=4)](https://github.com/jackled "jackled (1 commits)")[![glenndavey83](https://avatars.githubusercontent.com/u/6992344?v=4)](https://github.com/glenndavey83 "glenndavey83 (1 commits)")[![jfcherng](https://avatars.githubusercontent.com/u/6594915?v=4)](https://github.com/jfcherng "jfcherng (1 commits)")[![etrappg](https://avatars.githubusercontent.com/u/17647359?v=4)](https://github.com/etrappg "etrappg (1 commits)")[![r0manchak](https://avatars.githubusercontent.com/u/4974042?v=4)](https://github.com/r0manchak "r0manchak (1 commits)")[![shea-sollars](https://avatars.githubusercontent.com/u/2511672?v=4)](https://github.com/shea-sollars "shea-sollars (1 commits)")[![SyuTingSong](https://avatars.githubusercontent.com/u/680340?v=4)](https://github.com/SyuTingSong "SyuTingSong (1 commits)")[![tianyiw2013](https://avatars.githubusercontent.com/u/4644588?v=4)](https://github.com/tianyiw2013 "tianyiw2013 (1 commits)")[![amoydavid](https://avatars.githubusercontent.com/u/734190?v=4)](https://github.com/amoydavid "amoydavid (1 commits)")

---

Tags

databasemysqlsqlitepostgresqlmariadbsqlmssqloraclelightweightphp frameworkdatabase library

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jdelta-medoo/health.svg)

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

###  Alternatives

[catfan/medoo

The lightweight PHP database framework to accelerate development

4.9k1.5M194](/packages/catfan-medoo)[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k578.4M5.6k](/packages/doctrine-dbal)[tommyknocker/pdo-database-class

Framework-agnostic PHP database library with unified API for MySQL, MariaDB, PostgreSQL, SQLite, MSSQL, and Oracle. Query Builder, caching, sharding, window functions, CTEs, JSON, migrations, ActiveRecord, CLI tools, AI-powered analysis. Zero external dependencies.

845.7k](/packages/tommyknocker-pdo-database-class)[ramadan/easy-model

A Laravel package for enjoyably managing database queries.

101.6k](/packages/ramadan-easy-model)

PHPackages © 2026

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