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.
Related posts:
- Simple Pagination Using PHP Script
- How to get the query string value in perl cgi script
- Import large files in mysql using PhpMyAdmin
- Export MySQL to CSV (Excel) using php
- Simple PHP Login Script
- DOM elements dynamically using our JAVASCRIPT
- Send Email to Multiple Persons using php

Interesting blog, i have bookmarked it for future referrence
good one keep the spirits high….