# catfan/Medoo

The lightweight PHP database framework to accelerate the development.

Repository: https://github.com/catfan/Medoo
Canonical: https://ross.abutalabs.com/products/medoo
Homepage: https://medoo.in
Language: PHP
License: MIT
License Family: permissive
Topics: php, php-framework, database, medoo, composer, php-database-framework, php-frameworks, mysql, sqlite, mssql, postgresql, sql
Last push: 2026-08-22T04:27:15+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 87, longevity 100
- inputs: {"age_days": 4904, "days_push": 11, "days_rel": 11, "gap_med": 59, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4947, forks 1131 (observed 2026-08-28T04:09:03.661809+00:00)

## What it is
Medoo is a lightweight, single-file PHP database framework that provides a clean, intuitive API for building SQL queries across many database engines. It uses PDO and prepared statements to support MySQL, MariaDB, PostgreSQL, SQLite, MSSQL, Oracle, Sybase, and more.

## Use cases
- query a mysql database from php without writing raw sql
- build a crud api with insert select update delete in php
- use prepared statements to prevent sql injection
- run database queries across mysql postgresql and sqlite with one api
- integrate a lightweight database layer into laravel or slim
- perform aggregate queries like count sum max avg in php
- execute database transactions in php

## When to choose
- you want a tiny, dependency-free database layer for a PHP project
- you need a simple query builder instead of a full ORM
- you work with multiple SQL database engines and want one consistent API
- you want quick database access inside any PHP framework

## When to avoid
- you need a full ORM with entities, migrations, and relations like Doctrine or Eloquent
- you use a non-PHP language
- you need advanced features like lazy loading or unit-of-work persistence

## Facets
- artifact type: library
- maturity: stable
- function: database, orm, database-driver
- domain: databases, web-development, backend, developer-tools
- platform: php, cross-platform
- tags: sql-builder, pdo, query-builder, lightweight, mysql, postgresql, sqlite, mssql, prepared-statements

## Member repositories
- catfan/Medoo (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:03.661809+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:17:53.181813+00:00, confidence not recorded.
  - readme: https://github.com/catfan/Medoo (fetched 2026-08-28T04:09:03.661809+00:00, sha f1cf1fdd07e4)
  - homepage: https://medoo.in (fetched 2026-08-29T08:59:24.658361+00:00, sha f566f138d27f)
  - site_page: https://medoo.in/about (fetched 2026-08-29T08:59:24.669450+00:00, sha 4543ddaae4e6)
  - site_page: https://medoo.in/doc (fetched 2026-08-29T08:59:24.667464+00:00, sha 74a610e67c82)
- Data as of 2026-08-30T08:39:29.467469+00:00.
