Monday, February 27, 2006

Myspace backlash?

Are parents overreacting?

SQL Course

http://www.sqlcourse.com

Friday, February 24, 2006

Build a web page

http://pages.google.com/

Test SQL

SQL TEST. 3 Grades total. ALL SQL MUST WORK FOR FULL CREDIT!

SQL Problems (#1-#20 5 points each; two grades)
Use the following table named CITY_TEMPS for the next five questions:

City State High Low
Phoenix Arizona 92 69
Tucson Arizona 92 60
Flagstaff Arizona 90 72
San Diego California 90 65
Albuquerque New Mexico 105 67



1. Write an SQL statement that searches for the cities where the high temperature was above 88 degrees.


2. Find all the unique cities in Arizona.


3. Find all the cities that had a low below 70 degrees.


4. Find all the cities that have the letters “an”.



5. Find the average High temperature.


Creating tables:
6. Create a table STUDENT_RECORDS with five columns, while using proper SQL, which will contain the following information: test grade, behavior, first period, second period, third period, fourth period, fifth period, sixth period.




7. Create a table PRODUCT with four columns, using proper SQL, which will contain the following information: product, price, weight, quantity.





Inserting information:
8. Insert your own information into STUDENT_RECORDS using proper SQL.



9. Insert the following information into PRODUCT:
a. Nintendo, $100, 2 lbs, 4



b. Hula Hoop, $3, .5 lbs, 5



c. Computer, $200, 7 lbs, 2




Updating information:
10. Update PRODUCT so that the price of the Nintendo is $145.



11. Update the table so that STUDENT_RECORDS has a column for a seventh period.



Deleting information:
12. Delete all products from PRODUCT that cost less than $75.


13. The STUDENT_RECORDS table has become useless. Delete it completely from the database.




Modeling Information:
14. You have been hired to create a database for the computers in this room. What are four vital pieces of information will you need to keep track of?


15. Pretend the database has already been created and is known as COMPUTER. What SQL code is needed to create your table?




Inserting Information:
16. Populate the table (you choose the name) with FOUR pieces of information.



Searching Information:
17. (Easiest question on the test) Display everything in the table.


SQL Functions:
18. Refer to the CITY_TEMP table on page 1. You need to find the city with the lowest low temperature. What SQL code do you need?

:
19. Refer to the CITY_TEMP table on page 1. How many cities are in the table?


20. Refer to the CITY_TEMP table on page 1. Select all the cities from New Mexico.

ESSAY 50 points each (1 grade):
21. Describe the steps in creating a database, tables, and columns. What are the steps in populating the table?



22. How do PHP and MySQL work together?

Read this and comment

Read this!

Thursday, February 23, 2006

Your assignment

You are to use Access to make each table and query from the SQL test. Print out all tables and queries. Due today.

Wednesday, February 22, 2006

Might help with your extra credit

www.hotwired.com/webmonkey/06/08/index2a.html

cool stuff...

Monday, February 20, 2006

What I was saying in class...

Literacy.

Thursday, February 16, 2006

Write your opinion on this article after your test

After your test, read this article and evaluate it.

Tuesday, February 14, 2006

Study this for hw

Do these examples.

Monday, February 13, 2006

AJAX

Read this article.

Advanced students may want to take note

http://shiflett.org/articles/security-corner-apr2004

Read it for fun

Don't worry about evaluating it on your blog...just read it for fun.

Thursday, February 09, 2006

Read and summarize

Too important to ignore. Of course, consider the source but also consider the implications if there is any truth. http://www.thenation.com/doc/20060213/chester

Two things

Read this.

Tell me, is this a good idea? Why or why not!

SQL Course

Be ready for a quiz on this on Monday.

Study this.

Read this and explain it

And some of you thought calculating the area of a square was too hard...

Read this.
Comment on your blog.

Is this of any interest to our class?

http://www.intersmash.com/300images/

Cool google guide...check it out!

http://www.googleguide.com/advanced_operators_reference.html

Tuesday, February 07, 2006

Killian Club Coding Fun!

You need to make a PHP page with a survey that has at least 10 questions. The survey needs to write the answers to a MySQL database. You need a page that will access the answers to the database.

Just use a new table in your existing database.

Due Thursday.

Killian Club Coding Fun!

You need to make a PHP page with a survey that has at least 10 questions. The survey needs to write the answers to a MySQL database. You need a page that will access the answers to the database.

Just use a new table in your existing database.

Monday, February 06, 2006

Homework Assignment

Read This Guide to PHP and MySQL: http://freewebmasterhelp.com/tutorials/phpmysql

Then explain each line of this code as best you can:

$dbuser = "test";
$dbpass = "test";
$dbname = "test";
mysql_connect(localhost,$dbuser,$dbpass);
@mysql_select_db($dbname) or die ('Unable to select database.');
echo "Connected successfully.";
$sqlinsert = "INSERT INTO mark_table VALUES ('','David F','cool')";
mysql_query($sqlinsert) or die("DIDnT WORK");

$sqlview = "SELECT * FROM mark_table";
$result = mysql_query($sqlview);

$num=mysql_numrows($result);

$i=0;
while($i < $num) {
$id=mysql_result($result,$i,"id");
$user=mysql_result($result,$i,"user");
$pass=mysql_result($result,$i,"pass");
echo $id .' '. $user .' '. $pass .' '; $i=$i+1;
}

mysql_close;

This is due tomorrow.

sql statement

$sql = "CREATE TABLE mark_table (id int(5) auto_increment,user varchar(30),pass varchar(30),PRIMARY KEY (id),UNIQUE id (id),KEY id_2 (id))";

Sunday, February 05, 2006

Updating Information with PHP

Use this page.

Friday, February 03, 2006

Connection string

$dbuser = "test";
$dbpass = "test";
$dbname = "your group login goes here";
mysql_connect(localhost,$dbuser,$dbpass);
@mysql_select_db($dbname) or die ('Unable to select database.');
echo "Connected successfully.";
mysql_close;
?>

Connecting to a database!

We are going to create a web page that users can log into and out of! There is a database created and we are going to log into it! Read here.