dg/mysql-check

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

Installs: 5

Dependents: 0

Stars: 8

Watchers: 2

Language: PHP

v1.0.0 2013-06-23 21:44 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);

Project at GitHub: http://github.com/dg/MySQL-check

(c) David Grudl, 2008, 2013 (http://davidgrudl.com)