Facebook Twitter Reset

This Tutorial Has Been Viewed 1,946 Times.

How to run a SQL query in phpMyAdmin

How to run a SQL query in phpMyAdmin

Objective: In this tutorial, you will learn how to run a query using phpMyAdmin for use in our other tutorials.

Step 1: Create a database.Note:-If using cPanel, click MySQL® Databases, and create a new database, then click phpMyAdmin!

Step 2: Select the database you want to use on the left. If you have 1 database, there will be one, click it. If there is more than one, there will be a drop down box, use that to select the database you made in step 1.

Step 3: Click on the SQL tab on the top of the screen, it should be almost dead center.

Step 3: You will be presented with a text box, enter into that text box

Code:

CREATE TABLE `table` (

`row1` VARCHAR( 255 ) NOT NULL ,

`row2` VARCHAR( 255 ) NOT NULL

) ENGINE = MYISAM ;

Then click “Go”

You should now be presented with a message similar to this

Quote:

Your SQL query has been executed successfully (Query took 0.1072 sec)

Of course the time for it may be quicker or slower, depending on server factors and such.

Step 4: Optional By now clicking Structure you will see a new line:

You can click and do stuff to it using phpMyAdmin’s built in functions. You can insert data, remove data, edit data and get a feel for phpMyAdmin.

Step 5:

Click SQL Again, and enter this:

 

Code:

DROP TABLE `table`;

Guessing from the code, it will drop our new table called `table` which should be visible in the left sidebar.

VN:F [1.9.13_1145]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

Incoming search terms:




You will also be interested in ,

2 Responses to “How to run a SQL query in phpMyAdmin”

  1. February 25, 2009 at 4:26 am #

    Interesting blog, i have bookmarked it for future referrence

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 0 votes)
  2. March 10, 2009 at 4:32 pm #

    good one keep the spirits high….

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 0 votes)

Leave a Comment

Spam protection by WP Captcha-Free

Affordable Seo PackagesSeo BlogEdu Backlinks
More in Html, JavaScripts, PHP, scripts (155 of 213 articles)