PHP Classes

File: cli.php

Recommend this page to a friend!
  Classes of Moisés Lima   PHP PostgreSQL Show Table Relationships   cli.php   Download  
File: cli.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP PostgreSQL Show Table Relationships
Find relationships between PostgreSQL tables
Author: By
Last change:
Date: 8 months ago
Size: 460 bytes
 

Contents

Class file image Download
#!/usr/bin/php -q
<?php

require_once 'vendor/autoload.php';

use
TheMoiza\PostgresqlRelationshipFinder\RelationshipFinder;

$RelationshipFinder = new RelationshipFinder;

echo
$RelationshipFinder->find(
   
$tableDown = ['public' => 'order'],
   
$tableTop = ['public' => 'users'],
   
$connection = [
       
"DB_HOST" => "127.0.0.1",
       
"DB_PORT" => "5432",
       
"DB_DATABASE" => "database",
       
"DB_USERNAME" => "user",
       
"DB_PASSWORD" => "123",
       
"DB_SCHEMA" => "public"
   
]
);