dg / mysql-check
Checks a MySQL database for orphaned records or invalid foreign keys, i.e., keys pointing to missing rows.
Installs: 44
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 3
Forks: 2
pkg:composer/dg/mysql-check
This package is auto-updated.
Last update: 2025-09-12 10:40:11 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!