Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
swapnilmj committed Jun 30, 2012
0 parents commit 542ca7a
Show file tree
Hide file tree
Showing 31 changed files with 4,259 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.komodoproject
.komodotools
8 changes: 8 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The MIT License (MIT)
Copyright (c) 2012 Swapnil M. Joshi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
60 changes: 60 additions & 0 deletions Readme.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<title> Read me </title>
<style type="text/css">
body {
background-color: #F4F4F4;
font-size: 15px;
}

#container {
padding: 5px;
font-family: Arial, sans-serif;
background-color: #FFFFFF;
border-top: 2px solid #C7D3ED;
border-bottom: 3px solid #A2B3D3;
}

h3 {
opacity: 0.80;
}
</style>
</head>
<body style="">
<div id="container">

<h3>Readme </h3>
<p class="">
Web-based Visual Query Designer is a fork of my Academic project for B.Sc IT. <br/>
This tool is ready to be used for generating simple SELECT queries for MySQL.

</p>

<p class="">
Please let me know if you find it useful.
</p>

Swapnil Joshi <br/>
<span style="opacity: 0.75;">
swapnil [dot] gnu [at] gmail.com
</span> <br/><br/>
Project homepage: <a href="http://sourceforge.net/projects/web-vqd/" > http://sourceforge.net/projects/web-vqd/ </a><br/>

<h3>Installation</h3>
<p class="">
<ul id="">
<li>Extract all the files to the www folder of your web server.</li>

<li>Open conn.php file and set the $username and $password for your MySQL database. </li>
</ul>
</p>

Web-based Visual Query Designer is an open source software released under the
<a href="http://opensource.org/licenses/mit-license.php" > MIT License </a>.

</div>

</body>
</html>
45 changes: 45 additions & 0 deletions ajax/table_json.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php
require_once('../conn.php');
$Schema = $_COOKIE['schema'];
//$table_name = $_GET['table'];

//$table_name ='mTest';
$table_name = isset($_GET['table']) ? ($_GET['table']) :'mTest' ;

$finalArray = array();

//$query= "SHOW COLUMNS FROM $table_name";
$query= "SHOW COLUMNS FROM $table_name IN $Schema";

$result= mysqli_query($dbc,$query);
$FieldData = array();

$FieldData[] = array(
"TableName" => $table_name,
"ColumnName" => '*',
"IsPrimaryKey" => FALSE
);
while($row = mysqli_fetch_array($result)){

$FieldData[] = array(
"TableName" => $table_name,
"ColumnName" => $row['Field'],
"IsPrimaryKey" => ($row['Key'] == 'PRI'? TRUE:FALSE)
//"Selected" => true
);

}

/*
$finalArray = array(
"TableName"=> $table_name ,
"Fields" => $FieldData
);
*/

$finalArray = $FieldData;

print json_encode($finalArray);

?>
18 changes: 18 additions & 0 deletions ajax/table_list.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
include_once('../lib.php');

$Schema = $_GET['schema'];
?>
<?php
$query = "SELECT *
FROM `TABLES`
WHERE TABLE_SCHEMA = '$Schema'";
$result= mysqli_query($dbc_info_sch,$query);
//echo($query);
while($row = mysqli_fetch_array($result)){
$tableName = $row['TABLE_NAME'];
?>
<div class="item"><?php echo $tableName; ?></div>
<?php
}
?>
Loading

0 comments on commit 542ca7a

Please sign in to comment.