This option will reset the home page of this site. Restoring any closed widgets or categories.

Reset

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.5.7_846]
Rating: 0.0/10 (0 votes cast)
VN:F [1.5.7_846]
Rating: 0 (from 0 votes)

Related posts:

  1. Simple Pagination Using PHP Script
  2. How to get the query string value in perl cgi script
  3. Import large files in mysql using PhpMyAdmin
  4. Export MySQL to CSV (Excel) using php
  5. Simple PHP Login Script
  6. DOM elements dynamically using our JAVASCRIPT
  7. Send Email to Multiple Persons using php

2 Comments

  1. virsale says:

    Interesting blog, i have bookmarked it for future referrence

    VA:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.5.7_846]
    Rating: 0 (from 0 votes)
  2. rftysmq says:

    good one keep the spirits high….

    VA:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.5.7_846]
    Rating: 0 (from 0 votes)

Leave a Reply

Comments (required)

Spam Protected