Sql query examples image
  Article map > Welcome > FAQ > Viral Internet marketing


Sql Query Examples

If you want to go back, then this came from a tutorial on how to install PHP scripts and how to create a database in MySQL.

Following on from previous discussions, we have created a database, edited php files, uploaded our scripts to our server and set unix permissions where necessary. Ok, so now what? Well, the database we created is just a shell. It is the skeleton around which we can flesh out our database tables, but how do we do that?

Well, in this case, the programmer has created the sql queries in a text file, and all we have to do, is to tell out database about them. Ready to go?

Ok, the first thing that we have to do is log back in to our cpanel. You did this in the first lesson, so hopefully, you will be able to go straight there. If not, then you will need to check with your ISP about the location of your cpanel, and the username and password required to access them.

So, we are back to the control panel. Remember, it will probably look something like this

 

1. Click on the MySQL icon

2. Scroll down to the bottom of the page. You should see something like this



If you cannot see this then just look for the link to phpMyAdmin, which is a utility we will use to administer the database.
3. Once you access phpMyAdmin, you will see the following on the left hand side



And on the right hand side

4. Now, on the left hand side, click on the drop down box for a list of available databases. The one we created in an earlier tutorial should be there.



Notice that underneath it says no tables found in database.
5. Once you have selected this database, you will notice that the pane on the right hand side has changed as well.

6. If you wanted to add tables to your database by hand, then you could carry on from here.

Fortunately for us, the tables have been written, and all we have to do is to apply them.

Click on the SQL button. You should see a dialog similar to that shown below.

7. If you know SQL, you could manually create your queries here, in the top pane. But life has treated us more kindly. Click on the <Browse> button, and locate the directory on your hard drive where you have stored the script files. In our case, there is a file called 'sql.sql'. Load that and click on the <Go> button.

You should see the following at the top of the right hand pane.

8. On the left hand side now, you should see the following

9. And there we have it. Our database has been set up.

Crontab examples

Setting file permissions

How to install php scripts

Create a database in mysql

Upload files for free


This is a "Shareware" Article
(what's that?  read on...)

This article is shareware.  Give this article away for free on your site, or include it as part of any paid package as long as the entire article is left intact including this notice. 

Charlie Cory is an Internet Entrepreneur and Computer Consultant. Magical Marketing was created to help others use viral internet marketing techniques, without having to create their own websites.

Copyright http://www.magical-marketing.biz © 2006 .