PHPackages                             readdle/fqdb - 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. readdle/fqdb

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

readdle/fqdb
============

4.2.0(3y ago)551.8k↓50%41MITPHPPHP &gt;=7.4CI passing

Since Mar 17Pushed 1y ago10 watchersCompare

[ Source](https://github.com/readdle/fqdb)[ Packagist](https://packagist.org/packages/readdle/fqdb)[ RSS](/packages/readdle-fqdb/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (11)Versions (20)Used By (1)

fqdb
====

[](#fqdb)

Wrapper for PDO with specific DB operations and more checks. Available [via composer](https://packagist.org/packages/readdle/fqdb).

[![Latest Stable Version](https://camo.githubusercontent.com/5d74b5b8a207da185eff0d0b2671c3149e8948dd1ddd5a8b9f932ceb2928dac1/68747470733a2f2f706f7365722e707567782e6f72672f72656164646c652f667164622f762f737461626c65)](https://packagist.org/packages/readdle/fqdb) [![Total Downloads](https://camo.githubusercontent.com/460b60d70e8760b1040d47178ce856a96f02d8f7e78aac7a01a36c83123ae8f6/68747470733a2f2f706f7365722e707567782e6f72672f72656164646c652f667164622f646f776e6c6f616473)](https://packagist.org/packages/readdle/fqdb) [![License](https://camo.githubusercontent.com/f624e45f298b6e49954d2577f7ad61b51e8a0c5be372210eef3f05d026568d6a/68747470733a2f2f706f7365722e707567782e6f72672f72656164646c652f667164622f6c6963656e7365)](https://packagist.org/packages/readdle/fqdb) [![Build Status](https://camo.githubusercontent.com/1ace102adda9030d1fdceed3d10abbce112b5980e21edc79d6400c06eede409c/68747470733a2f2f7472617669732d63692e6f72672f72656164646c652f667164622e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/readdle/fqdb)

Instantiating:

##### Create FQDB instance directly

[](#create-fqdb-instance-directly)

```
$fqdb = new \Readdle\Database\FQDB('mysql:host=localhost;dbname=test', 'user', 'password');
```

##### Create FQDB instance via FQDBProvider

[](#create-fqdb-instance-via-fqdbprovider)

```
// parses ~/.my.cnf
$fqdb = FQDBProvider::dbWithMyCnf($database);

// dsn example: mysql:host=127.0.0.1;dbname=database;charset=utf8mb4
$fqdb = FQDBProvider::dbWithDSN($dsn, $user, $password);

$fqdb = FQDBProvider::dbWithMySQLHostUserPasswordDatabase($host, $user, $password, $database);
```

##### Examples of usage:

[](#examples-of-usage)

```
$fqdb = new \Readdle\Database\FQDB('mysql:host=localhost;dbname=test', 'user', 'password');

$value = $fqdb->queryValue("SELECT 2+2");
// $value == 4

$hash = $fqdb->queryAssoc("SELECT id, content FROM idcontent WHERE id=13");
// $hash = ['id' => 13, 'content'=>'...']

// to use a custom connector you can register it before instantiating the FQDB
\Readdle\Database\FQDB::registerConnector(\Readdle\Database\ConnectorInterface $connector);
$fqdb = new \Readdle\Database\FQDB($optionSupportedByYourConnector);
```

FQDB has separate methods for different SQL queries. It throws exception if SQL query and method name does not match.

- insert
- delete
- replace
- update
- set
- select and show (queryValue, queryList, queryVector, queryAssoc, queryTable, queryObj, queryObjArray, queryTableCallback, queryTableGenerator, queryHash)

FQDB uses PDO named parameters with additional checks for unused parameters and unbind parameters.

For MySQL driver FQDB has optional warning reporting that emits MySQL warnings as PHP warnings.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 52.6% 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 ~170 days

Recently: every ~242 days

Total

17

Last Release

1349d ago

Major Versions

v1.1.4 → v2.02016-02-05

2.3 → 3.02019-07-12

3.1.0 → 4.0.32021-07-08

PHP version history (4 changes)v1.0PHP &gt;=5.4.0

v2.2PHP &gt;=5.5.0

3.0PHP &gt;=7.2.0

4.0.3PHP &gt;=7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/994900?v=4)[Andrian Budantsov](/maintainers/AndrianBdn)[@AndrianBdn](https://github.com/AndrianBdn)

---

Top Contributors

[![AndrianBdn](https://avatars.githubusercontent.com/u/994900?v=4)](https://github.com/AndrianBdn "AndrianBdn (50 commits)")[![melya](https://avatars.githubusercontent.com/u/1429229?v=4)](https://github.com/melya "melya (27 commits)")[![th0rb](https://avatars.githubusercontent.com/u/5197367?v=4)](https://github.com/th0rb "th0rb (9 commits)")[![WalentinG](https://avatars.githubusercontent.com/u/38650680?v=4)](https://github.com/WalentinG "WalentinG (4 commits)")[![draev](https://avatars.githubusercontent.com/u/842729?v=4)](https://github.com/draev "draev (2 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")[![arodik](https://avatars.githubusercontent.com/u/2021794?v=4)](https://github.com/arodik "arodik (1 commits)")[![aka-toxa](https://avatars.githubusercontent.com/u/1811078?v=4)](https://github.com/aka-toxa "aka-toxa (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/readdle-fqdb/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)[usmanhalalit/laracsv

A Laravel package to easily generate CSV files from Eloquent model.

6151.7M4](/packages/usmanhalalit-laracsv)[hipsterjazzbo/landlord

A simple, single database multi-tenancy solution for Laravel 5.2+

613270.0k1](/packages/hipsterjazzbo-landlord)

PHPackages © 2026

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