Skip to content

Commit

Permalink
Polishing up final chapter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate Allen committed May 9, 2012
1 parent 721b474 commit 7c5b00e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
1 change: 1 addition & 0 deletions app/controllers/sqlcons_controller.rb
Expand Up @@ -9,6 +9,7 @@ def index
session[:maxsec] = Sqlcons.maximum(:sec, :conditions => "ch = 1")
session[:tutch] = 1
session[:tutsec] = 1
pickdisplay
render :index
end

Expand Down
14 changes: 8 additions & 6 deletions app/views/sqlcons/index.html.erb
@@ -1,24 +1,26 @@
<div class="container-fluid">
<div class="span6">
<body>
<h2>Welcome to TrySQL!</h2>
<h3>Welcome to TrySQL!</h3>
<p>
Just by arriving at this page, you've begun your first step on the road to database mastery. The goal of this website is to take you through some basic tutorials, giving you a general feel of how Structured Query Language works. The scope of this tutorial is to familiarize you with the language and specifc methods of querying, if you need an overview of databasing, I recommend you go
Just by arriving at this page, you've begun your first step on the road to query mastery. The goal of this website is to take you through some basic tutorials, giving you a general feel of how Structured Query Language works. The scope of this tutorial is to familiarize you with the language and specifc methods of querying, if you need an overview of databasing, I recommend you go
<%= link_to("here.", 'http://code.google.com/edu/tools101/mysql.html')%>
<br />
<br />
The tutorial will allow you to interact with a database by writing SQL statements to it. Click the "querydb" button to submit your statement to the database. The results (or an error message) will display back to your screen. Once you are ready for the next lesson, simply hit the "Next Section" link.
The tutorial will allow you to interact with a database by writing SQL statements to it. Click the "QueryDB" button to submit your statement to the database. The results (or an error message) will display back to your screen. Once you are ready for the next lesson, simply hit the "Next Lesson" button.
<br />
<br />
To start, let's write a simple select query against the database. Try <code>"select * from courses"</code> below.
To start, let's write a simple select query against the database. Try <code>"select * from courses"</code> below.
</p>

<!--Text area for next query-->
<%= form_tag(sqlcons_fetchquery_path, :method => "get") do %>
<%= text_area_tag(:q, "", :size=>"90x3") %>
<br />
<%= submit_tag("querydb", :onclick=>"this") %>
<%= submit_tag("QueryDB", :onclick=>"this") %>
<% end %>
</body>
</div>
<div class="span6">
<%= render :file => @help_name%>
</div>
</div>
3 changes: 3 additions & 0 deletions app/views/sqlcons/tutorials/congratulations.html
Expand Up @@ -3,4 +3,7 @@ <h2>Congratulations!</h2>
<h4>
You've completed the final section of the final chapter in this tutorial series. Feel free to return to the hompage (click TrySQL in upper left) and jump to specific chapters if you want to play around more. Otherwise tell your friends and email any concerns to nmallen89@gmail.com.
</h4>
<br />
<!-- For amusement purposes. -->
<img src="http://gifs.gifbin.com/1232905446_michael%20phelps%20victory%20reaction.gif"/>
</body>
6 changes: 3 additions & 3 deletions app/views/sqlcons/tutorials/tut4-4.html
@@ -1,7 +1,7 @@
<h3>Ch4-4 : Max/Min</h3>
<p>
<br /> <br />
<br /><code>code &gt; 1</code>
The final section of our tutorial involves the max/min functions. The syntax is identitcal, but as you might guess the result for each varies. Use this functions on a particular column to fetch the maximum/minimum value of that field.
<br /><code>select max(id) from course_fcts</code>
<br / >

Note: To increase complexity, add a where clause limit which rows you search for max/min in.
</p>

0 comments on commit 7c5b00e

Please sign in to comment.