Chapter
24 - MySQL
Overview
MySQL Control
Panel Feature
Examples of SQL Statements
Quick Actions
Advanced Queries
Table Select
Using MySQL With CGI Scripts
References and Tutorials
Using
The MySQL Control Panel
The MySQL feature inside your Control Panel is where you manage your database,
including designing tables, adding, deleting, and updating records, all
from within your web browser.
When you first click on the MySQL feature, you will be asked to provide
a name for your database and a password, you can use the same username
and password that you use for your Control Panel if you so desire. Once
the database is created, and you return to this feature inside your Control
Panel it will then become the Welcome page for your database. A tree view
is on the left. The name of your database and the version of MySQL are
displayed to the right of the tree.
The Tree
The top entry in the tree, Home, will return you to the Welcome
page. Beneath that is your database name and a square with a plus or minus
sign in it. Clicking the square will show and hide the names of the tables
in the database in the tree. Clicking on the database name in the tree
will display the main database management page. Clicking on one of the
tables names in the tree will display the properties of that table.
The
Main Database Management Page
This page displays a list of all the tables
in your database and the number of records in each. You can also execute
an SQL statement, perform advanced queries,
dump the database, and create
new tables.
The
List of Tables
Next to each table name are links to various actions you can perform on
a table.
- Browse
Display the records in the table 30 at a time. From the Browse page
you can edit or delete a record.
- Select
Build and execute a SELECT query on the table. Only those records which
match the criteria you provide will be displayed.
- Insert
Add a new record to the table. Enter the data in the fields provided.
Various functions can be used to obtain the current time, generate random
numbers, and more. Press the Save button to insert the record into the
table.
- Properties
Display the fields in the table with their data type and attributes.
Table management functions for the table are also provided.
- Drop Remove
the table and its contents from the database. Once you do this neither
the table nor the data will be available.
- Empty
Delete all of the records in the table. Once you do this the table will
still exits but the data in the table will no longer be available.
Execute
an SQL Statement
Any SQL statement can be executed on your database by typing it into the
textbox labled Run SQL query/queries on database and pressing
the Go button. For help with SQL statements ???
Query
by example
Advanced queries can be built and executed using a graphical interface.
View dump (schema) of database
Dumping of the database displays the structure and or data contained in
the database. You can then save this information to a file on your local
computer for archiving or to aide in the development of your database.
The contents and format of the dump are based on the radio button and
check box selections you make. See also View dump (schema) of table.
Create
a new table
Create a new table by typing in the name of the table and the number of
fields to be in the table and pressing the Go button. You
will be shown a page which will allow you to set up the data type and
attributes of each field.
|