<?php
ob_start();
session_start();
// DB Config
$db_host = "localhost";
$db_username = "db_username";
$db_password = "db_password";
$db_name = "database_name";
try {
$connect = new PDO('mysql:host=' . $db_host . ';dbname=' . $db_name, $db_username, $db_password);
$connect->setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, 'SET NAMES utf8');
$connect->exec('set names utf8');
} catch (PDOException $ex) {
die("Unable Connect To DataBase");
}
/// DB Tables Showing Config
$showTables = array(); // show all tables
/*
$showTables = [
['depo'],
['kontak']
]; //show only in array tables
*/
// example configuration for relation
// Table Relation
$relationTable = [
'depo' => [
'changedRow' => "super_id",
'secondTable' => "members",
'secondRow' => "memberID",
'findRow' =>"username"
],
'gelir_gider' => [
'changedRow' => "uid",
'secondTable' => "members",
'secondRow' => "memberID",
'findRow' =>"username"
]
];
// Change Table Column Names
$customColumnsNames = [
'depo' => [
["colon0" => "1"],
["colon1" => "2"],
["colon2" => "3"],
]
];
// Change Table Names
/*$customColumnsNames = [
["depo" => "Depo"],
["gelir_gider" => "Gider"],
["kontak" => "Kontak"],
];*/
$imageColums = [
'depo' => "images"
];
?>
|