Repolode
catfan

catfan/Medoo

A lightweight single-file PHP database framework that simplifies common SQL operations with a clean, intuitive API.

Stars
4,949
Forks
1,122
Open issues
48
Last commit
11 days ago

What is it?

Medoo is a PHP database framework that wraps PDO so developers can run common SQL operations such as insert, select, update and delete through simple method calls instead of hand-written query strings. It is distributed as a single-file package with minimal dependencies and installs via Composer.

The README states that Medoo works with MySQL, MariaDB, PostgreSQL, SQLite, MSSQL, Oracle and Sybase, and that it is designed for complex SQL, data mapping and prepared statements while keeping code readable. It also says it fits into frameworks such as Laravel, CodeIgniter, Yii and Slim.

Requirements are PHP 7.3 or later with the PDO extension enabled. The project is MIT licensed and includes PHPUnit tests and php-cs-fixer for code style.

Key features

  • 01Single-file package with minimal dependencies
  • 02Clean API for insert, select, update and delete
  • 03Supports MySQL, MariaDB, PostgreSQL, SQLite, MSSQL, Oracle and Sybase
  • 04Handles complex SQL and prepared statements
  • 05Installable via Composer

Use cases

  • Adding database access to a small PHP web application without a heavy ORM
  • Building CRUD features quickly in projects using Laravel, Slim or Yii
  • Writing PHP scripts that must work across several SQL database engines

Quick start

  1. 1

    Install Medoo with Composer

    composer require catfan/medoo
  2. 2

    Load the Composer autoloader and create a database connection in PHP

Things to know

  • Requires PHP 7.3 or later with the PDO extension enabled.

In collections

Topics

FAQ

What is Medoo?
A lightweight single-file PHP database framework that simplifies common SQL operations with a clean, intuitive API. Medoo is a PHP database framework that wraps PDO so developers can run common SQL operations such as insert, select, update and delete through simple method calls instead of hand-written query strings. It is distributed as a single-file package with minimal dependencies and installs via Composer.
Is Medoo free to use? What license does it have?
Medoo is open source under the MIT license. Check the license terms before using it in commercial products.
Is Medoo still maintained?
Actively maintained. The last commit to Medoo was on Oct 26, 2026.
What can I use Medoo for?
Adding database access to a small PHP web application without a heavy ORM Building CRUD features quickly in projects using Laravel, Slim or Yii Writing PHP scripts that must work across several SQL database engines
How do I install Medoo?
Install Medoo with Composer: composer require catfan/medoo Load the Composer autoloader and create a database connection in PHP
Where can I get Medoo?
The source code and installation instructions are on GitHub: https://github.com/catfan/Medoo

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects