This example shows Example-1 done in phpMyAdmin instead of hand-coded SQL. In this example I will create a table of users, add two users, and delete a user. The table consists of a username, an encrypted password, and a unique user id number for each user.
Begin by logging onto your phpMyAdmin account. After logging in you will be presented with a drop-down list of available databases. Select your database.
You can now add a new table to your database. This is available through the "Create new table on database..." fields. Simply name the table and enter the number of fields.
To create a users table with username, password, and user id, the parameters can be selected from the menu. phpMyAdmin will generate and issue a command like:
create table users ( username varchar(20) not null, password varchar(20) binary not null, id mediumint(10) default '0' not null auto_increment, primary key(id) );
The next screen will show the table structure.
Users can now be added to the database. This can be done through the Insert page. To add a user named User, just input "User" in the Value column of the username field. To use the password "PassWord", enter the value in the value field. Select PASSWORD from the function menu. After inserting, you can look at the Browse tab to view the table. Notice that the password field is stored in encrypted form. Additional users can be added using the same process.
To search the table, the Search page can be used. Rows in a table can be deleted by selecting the trash-can Link under the Browse page or a search results page. If you ever want to use a SQL statement, the SQL page allows manual SQL entry.