1. Go to this page and download the library: Download victorwesterlund/innodb-fk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
victorwesterlund / innodb-fk example snippets
use victorwesterlund\ForeignKeys
use victorwesterlund\ForeignKeys
$fk = new ForeignKeys($host, $user, $pass, ForeignKeys::DATABASE_NAME);
$fk->for("test", "bar")->get_constraints();
[
// Name of the column that has a foreign key reference
"fk" => [
// key is the database and table it references. Value is the column
"test.foo" => "id"
]
]