|
|
| 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. Next to each table name
are links to various actions you can perform on a table.
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. Advanced queries can be built and executed using a graphical interface. Advanced Queries Queries are built by selecting the fields to search on and the criteria to use for the search. The SQL statement that will be executed is displayed in the textbox in the lower right. The statement is updated to reflect the values provided in the rest of the form fields on the page by pressing the "Update Query" button. Execute the statement by pressing on the "Submit Query" button. Each column can be used to specify a field for the SQL statement. Empty columns are ignored. The fields specified in the "Fields" row are combined with criteria below it to create a WHERE clause. If the "Show" checkbox in on then the field is placed in the SELECT clause as well. The query results may be sorted on a field based on the selection in the "Sort" menu. More fields can be added by turning on the "Ins" checkbox below a column or selecting a positive number in the "Add/Delete Field Columns" menu. Fields are deleted by turning on the "Del" checkbox or selecting a negative number in the "Add/Delete Field Columns" menu. Press "Update Query" to update the page to reflect the changes. You may have to scroll your web browser to the right to see all of the field columns. The tables selected in the "Use Tables" listbox form the FROM clause. Also, the fields listed in the "Fields" menus are restricted to the fields in the selected tables. Each criteria should be placed on a separate criteria row. If the "And" radio button is selected for a criteria row, that row will be logically AND'd in the WHERE clause. If the "Or" radio button is selected, that row will be logically OR'd in the WHERE clause. Criteria are not required for any column. If not provided and the "Show" checkbox is on, the field will be shown for all records that match any other criteria. Criteria are added and deleted in a manner similar to adding/deleting fields using the checkboxes to the left of a criteria row or the "Add/Delete Criteria Row" menu. Again, press "Update Query" to update the page. 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. The "View Dump (Schema) of Database" section of the Main Database Management page is useful. Pressing the associated Go button will generate a page containing the SQL statements for recreating the database. If the "Structure and Data" radio button is selected, the SQL statements for INSERTing the data will be generated as well. Turn on the. "Add 'DROP TABLE'" checkbox and the SQL statements to DROP the tables will be included also. When you drop a table, the table is deleted. Turning on the "Send" checkbox, causes the generated SQL statements to be sent to you as a file which you can save to your harddisk. The "View Dump(Schema) of Table" section of the Table Properties page allows you to obain a dump of a single table. The additional radio button, CVS will return the data in the table with each record as a seperate line. The fields are delimited by the character specified in the "Terminated by" textbox. The dumped data can be imported into another database or a spreadsheet, or archived for backup. NOTE: None of the selections
above will alter your database.
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 datatype and attributes of each field.
|