minor changes to frontend

This commit is contained in:
Pedro 2014-11-17 22:13:29 +01:00
parent 070ea2de28
commit ec924ab500
4 changed files with 26 additions and 18 deletions

View File

@ -31,7 +31,7 @@
<!-- Input --> <!-- Input -->
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<textarea id="queryInput" class="form-control" style="height: 300px; resize: none;">SELECT * FROM students;</textarea> <textarea id="queryInput" class="form-control" style="height: 300px; resize: none;" placeholder="Enter your SQL query here..."></textarea>
</div> </div>
</div> </div>

View File

@ -1,2 +1,10 @@
#!/bin/sh #!/bin/sh
python -m SimpleHTTPServer 10101
# Default Port
PORT="10101"
if [ $# -gt 0 ]; then
PORT=$1
fi
python -m SimpleHTTPServer ${PORT}

View File

@ -3,13 +3,15 @@ CREATE TABLE IF NOT EXISTS students FROM TBL FILE 'test/students.tbl';
CREATE TABLE IF NOT EXISTS test FROM TBL FILE 'test/lin_xxs.tbl'; CREATE TABLE IF NOT EXISTS test FROM TBL FILE 'test/lin_xxs.tbl';
CREATE TABLE IF NOT EXISTS companies FROM TBL FILE 'test/tables/companies.tbl'; CREATE TABLE IF NOT EXISTS companies FROM TBL FILE 'test/tables/companies.tbl';
CREATE TABLE IF NOT EXISTS employees FROM TBL FILE 'test/tables/employees.tbl'; CREATE TABLE IF NOT EXISTS employees FROM TBL FILE 'test/tables/employees.tbl';
# SELECT (1) # SELECT
SELECT * FROM students; SELECT * FROM students WHERE grade <= 2.0;
# SELECT (2) # SUB-SELECT
SELECT name, city, grade FROM (SELECT * FROM students WHERE city = 'Potsdam') t1 WHERE grade <= 1.5 OR grade >= 3.5; SELECT name, city, grade FROM (SELECT * FROM students WHERE city = 'Potsdam') t1 WHERE grade <= 1.5 OR grade >= 3.5;
# GROUP # GROUP
SELECT city, AVG(grade) AS average|, MIN(grade) AS best, MAX(grade) AS worst FROM students GROUP BY city; SELECT city, AVG(grade) AS average|, MIN(grade) AS best, MAX(grade) AS worst FROM students GROUP BY city;
# UNION # UNION
SELECT * FROM students WHERE grade = 1.3 UNION SELECT * FROM students WHERE grade = 3.7; SELECT * FROM students WHERE grade = 1.3 UNION SELECT * FROM students WHERE grade = 3.7;
# JOIN # SIMPLE JOIN
SELECT * FROM companies JOIN employees ON company_id = employee_company_id SELECT * FROM companies JOIN employees ON company_id = employee_company_id;
# HASH JOIN
SELECT * FROM companies HASH JOIN employees ON company_id = employee_company_id;

View File

@ -7,19 +7,17 @@ div {
margin: auto; margin: auto;
} }
.content {
width: 90%;
margin: auto;
margin-top: 10px;
}
button { button {
margin-left: 1px; margin-left: 1px;
margin-right: 1px; margin-right: 1px;
} }
/* table {
#resultTable td { font-size: 14px;
border: 1px solid #333; }
padding: 10px;
}*/ .content {
width: 90%;
margin: auto;
margin-top: 10px;
}