An open API service indexing awesome lists of open source software.

https://github.com/dg/mysql-check

Checks a MySQL database for invalid foreign keys, i.e., a keys pointing to missing rows.
https://github.com/dg/mysql-check

invalid-foreign-keys mysql-database php

Last synced: 3 months ago
JSON representation

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

Awesome Lists containing this project

README

          

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!