Watching:

Adding database tables


show more Adding database tables provides you with in-depth training on Developer. Taught by Candyce Mairs as part of the Dynamic Dreamweaver Websites: Creating Login Areas show less
please wait ...

Adding database tables

We are now going to add four additional database tables to our database for this course. When we installed the database initially within the install course files movie we only added one table to the database. And that is the log in table. So that is all our database contains at this point. I wanted to show you how you can add additional tables to a database that already exists within the PHP MyAdmin area.

The first thing you need to do is start Apache and MySQL. So I will click the Start button. For both of these. Now on the Mac side, you would go out to the MAP control console. On the PC side, we use the ZAMP Control panel. To get to the Zamp control panel, Here is my short cut. Now if I double-click this, I will need to approve it on the Window side, so I will say yes, and I'm getting this message.

I don't want you to think there's a problem with the ZAMP if you get this message, all it means is the control panel itself is already open. So I will click OK, and we'll go down to this task bar area. And this is how I can access the Control panel. So if I close and open this, it turns it on. Or I should say it turns on the Control panel. It is not turning on your web server or your database specifically.

So once we have that open, I'm going to start both of these. Once I do, I get the word running in green. If you are on the Mac side. You want to start MAMP. And MAMP is located inside your Applications folder. You should see a MAMP folder, and inside of that you can Double-click the MAMP icon. That will open up the MAMP control console and you click the Start Servers button within that environment. Okay so we have this running.

We know my sequel is working. I'm going to click the Admin button to the right of my sequel. I want to get out to the administrative area for my sequel. And what this is, is an interface. This is a little gooey. We used to have to insert tables using the command line in either the Command Interface on Windows, or Terminal on the Mac's side. Now we have this capability. We now can use PHP My Admin and have this nice little interface.

Now I do have an extra database in here that you will not see in yours and that's this unique database. If I select that database, I can delete it so it is possible. If I click the databases tab, you can see here is my database and if I check that particular database. And highlight over this, you can see it says drop. So in order to delete a database, I just want to show you this, I click the drop.

It says I'm about to destroy one, it's going to explode on us, I love that, but this is an important thing. Just in case I accidentally did this, it's a very nice reminder. I will say, do I really want to? Yes. And that database is now gone. Now you will not have that database within your interface. I just wanted to show you it's possible to drop a database. What we want to do is go over to our scuba to you it has one table this number inside the parenthesis says how many tables there are.

I will click on that and you can see we just have one table. What I want to do is add more tables to this database. So how do I go about doing that? Within your chapter 5 course files I do have another file and if you take a look at your chapter 5 start files, this is the website if you want to start chapter 5. This Chapter 5 folder will have all of the files as if you had done everything in lessons 1 to 4. But this database here, I've copied out to my desktop just to make it easier to access.

This is one called Scuba2You more this contains four additional tables we're going to put into our database. So make sure you go out to the chapter five start files and make this file easily accessible on your system so we can get to it by browsing. Now I'll go back to the admin interface and select Scuba2U. Now that I'm here, I'm going to import that file. So I will click on the import tab so make sure you are in the Scuba2U database. Log-in and showing, I'll go over here and click Import. Now I simply browse out to that text file.

Once I find it, I click the Go button in the bottom right. So I'll browse out to my desktop, move down to that sequel Scuba2U more, I'll select that file, and I will click go. I now have imported four more tables into my database. As you can see it now says five. And if I look at the structure tab here our my individual tables, within the database.

So we just very easily added four more tables to our database. I wanted to give you the chance to do this so you can get a little bit more familiar with this PHP My Admin area. If you're going to be working with data bases And dynamic driven websites, you will have to become familiar with this area and PHP My Admin is the same area on both the Mac side and the PC side so it makes it easy between the two systems. So that is how you can add additional database tables to your database for Scuba2You.

Now that we have additional information inside our database, we can start pulling that data and populating it onto our webpages. Prior to doing that we need to tell Dream Weaver Where are database is located? So we're going to move into Dreamweaver piece, letting Dreamweaver store that connection file for us so we connect us this database when we need to. So that is how you can work in the PHP my admin area to administer your database

Adding database tables
Video duration: 7m 34s 4h 21m Intermediate

Viewers:

Adding database tables provides you with in-depth training on Developer. Taught by Candyce Mairs as part of the Dynamic Dreamweaver Websites: Creating Login Areas

Subjects:
Developer Web video2brain
Software:
Dreamweaver
Author:
please wait ...