dg/mysql-check

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

Maintainers

👁 david@grudl.com

Package info

github.com/dg/MySQL-check

pkg:composer/dg/mysql-check

Statistics

Installs: 44

Dependents: 0

Suggesters: 0

Stars: 17

v1.0.0 2013-06-23 21:44 UTC

Requires

None

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

BSD-3-Clause 4edd50a65b90d75f2dfe21dea7030ed347fa94e4

mysql

This package is auto-updated.

Last update: 2026-06-12 12:30:33 UTC


README

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

Create MySQLi 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. Thank you!