Skip to content

Commit

Permalink
Ok
Browse files Browse the repository at this point in the history
  • Loading branch information
milos92100 committed Dec 5, 2015
1 parent b4407b4 commit b0e7664
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 23 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# ReverseEngineeringBeta
Test project
#
24 changes: 6 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
{
"name" : "revelin/sample",
"version": "0.1.0",
"name" : "my-revelin-test-project",
"version": "1.0.0",
"description" : "test",
"homepage" : "http://ec2-54-68-123-230.us-west-2.compute.amazonaws.com",
"repositories": [{
"type": "package",
"package": {
"name": "revelin/library",
"version": "0.1.0",
"source": {
"url": "https://github.com/milos92100/ReverseEngineeringBeta.git",
"type": "git",
"reference":"0.1.0"
}
}
}],

"require": {

"require": {
"php": ">=5.4.0",
"phpunit/phpunit": "4.8.*",
"kherge/box": "^2.6"



}

}
8 changes: 5 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

// include 'vendor/lichtner/fluentpdo/FluentPDO/FluentPDO.php';

// use PDO;
// use FluentPDO;
// $pdo = new PDO("mysql:dbname=chatsky", "root", "milos");
// $fpdo = new FluentPDO($pdo);
$link = mysql_connect("localhost", "root", "milos");
mysql_select_db("chatsky", $link);

$query = "SHOW TABLES";
$res = mysql_query($query, $link);

$tables = array();

while ($row = mysql_fetch_assoc($res)) {

$tables[] = array_values($row);
}

// var_dump($tables);

$data = array();

foreach ($tables as $table => $val) {

foreach ($val as $a => $v) {

$query = "DESCRIBE " . $v;
$res = mysql_query($query, $link);

while ($row = mysql_fetch_object($res)) {

// var_dump($row);
$data[$v][] = $row;
}
}
}

echo json_encode($data);




0 comments on commit b0e7664

Please sign in to comment.