PHPackages                             dg/mysql-check - 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. dg/mysql-check

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

dg/mysql-check
==============

Checks a MySQL database for orphaned records or invalid foreign keys, i.e., keys pointing to missing rows.

v1.0.0(12y ago)17442BSD-3-ClausePHP

Since Jun 23Pushed 6y ago2 watchersCompare

[ Source](https://github.com/dg/MySQL-check)[ Packagist](https://packagist.org/packages/dg/mysql-check)[ Docs](https://github.com/dg/MySQL-check)[ RSS](/packages/dg-mysql-check/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

MySQLChecker
============

[](#mysqlchecker)

Checks a MySQL database for orphaned records or invalid foreign keys, i.e., keys pointing to missing rows.

Create [MySQLi](http://www.php.net/manual/en/mysqli.construct.php) object and then check database named `blog`:

```
$mysqli = new mysqli('localhost', 'root', 'password');
checkForeignKeys($mysqli, 'blog');

```

Or without parameter it checks all databases:

```
checkForeignKeys($mysqli);

```

If you like it, **[please make a donation now](https://nette.org/make-donation?to=mysql-check)**. Thank you!

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

4709d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/17f266513a3ca97500ec3d85d562b9279c7a6346358fe2b8d90390ece717a027?d=identicon)[david@grudl.com](/maintainers/david@grudl.com)

---

Top Contributors

[![dg](https://avatars.githubusercontent.com/u/194960?v=4)](https://github.com/dg "dg (3 commits)")

---

Tags

invalid-foreign-keysmysql-databasephpmysql

### Embed Badge

![Health badge](/badges/dg-mysql-check/health.svg)

```
[![Health](https://phpackages.com/badges/dg-mysql-check/health.svg)](https://phpackages.com/packages/dg-mysql-check)
```

###  Alternatives

[doctrine/dbal

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

9.7k578.4M5.6k](/packages/doctrine-dbal)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k25.2M34](/packages/kirschbaum-development-eloquent-power-joins)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58523.9M36](/packages/scienta-doctrine-json-functions)[cytopia/mysqldump-secure

Secure mysqldump script with encryption, compression, logging, blacklisting and Nagios monitoring integration

1474.7k1](/packages/cytopia-mysqldump-secure)[ark/database

Light weight database abstraction

117.8k](/packages/ark-database)

PHPackages © 2026

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