CSI 360 - Database Systems
Below is a txt listing of the files I used to complete the hw3 db project. You may use them as a reference for your final project. Also, on the servers, you can type (on the command line): php -l filename.php
Please note that the -l is a dash el (it is not dash one). This will test the syntax of your php file. So when you get a simple white page (as sometimes happens) it is usually due to a syntax error and you can check the error with this command. If your page renders *something* you can usually use $link->error
to see those errors.
- index This file just links to everything else in a nice way. You will be required to write a landing page for your final project.
- make This file drops tables, makes tables and inserts a few data rows. It is useful to start by coding this page first as it will help you put the tables you created from your ER diagrams into the database. You might consider removing the drop feature temporarily as you work on things or even separating it into its own file.
- displayall This is useful to make sure you understand every column and table in your database. It is not great to look at your data this way, but this is huge in the debugging process.
- students | classes | attending These pages are great for displaying just one table. Once you have a file that displays the table once, you can use this everywhere. My php files assume the $link is open and available and does not close it. I then use these files everywhere that I want to display all the entries in one of these tables like the displayall or inserts.
- data Really just an html form. Read the comments inside for insight.
- insert1 | insert2 | insert3 These are the corresponding inserts to the data forms.
- list This page actually lists all the classes and allows you to choose one of them to display in the join. Most groups did not implement this page in this way but it is an option.
- join Display all the students attending a particular class.
- stylesheet This is a nasty bugger. I'm not sure that you really want to use all this. The last lines starting around "table" are all you'd likely want to fiddle around with. You might also want to copy and modify the part listed as "body" to make your own color scheme. But this file is just how to color and organize different html code.
- config.php - not linked. Refer to old handouts for a sample