The MySQL module allows you to view the contents of any table in any database. Tables that have a primary key can have their records modified or deleted and new ones added as well.
Unfortunately, there is no way to edit the contents of a table without a key, as the module needs some way of identifying specific records. All tables in a database should have one, however.
To view the contents of a table, follow these steps:
1. | On the main page, click on the icon for the database that contains the table, and then on the icon for the table itself. |
2. | On the table editing form, click on the View Data button at the bottom. This will bring you to a page displaying the first 20 rows in the table. |
3. | If the table contains more rows than can be displayed on one page, the start and end of the visible range and the total number of rows will be displayed at the top. Next to it are left and right arrows for moving to the next or previous 20 records. |
4. | For large tables, a search form is also displayed at the bottom of the page. To use it, select a field name from the first menu and a comparison type from the second, and enter a value to search for in the final text box. When the Search button is clicked, only rows for which the chosen field matches will be displayed. To switch back to viewing all records, click the Reset search link that now appears above the table. The contains comparison type finds records in which the field contains the entered text, while the matches type finds records for which the field value matches an SQL pattern as used in a like clause. In such a pattern, % matches any string of characters, and _ matches any single character, just like * and ? do at the shell prompt. |
5. | When viewing a large table, a button labeled Jump to is also displayed at the bottom of the page. If a number is entered into the adjacent field and the button is clicked, the display will move immediately to that row. |
If the table has a primary key, this same page can also be used to edit, delete, or add records. Records to edit must first be selected using the checkboxes to the right of each row or the Select all and Invert selection links. When you click the Edit selected rows button, the page will be re-displayed with the values of all chosen records in text boxes. Make whatever changes you like and click the Save button at the bottom of the page to update the database. Or, hit Cancel if you want to stop editing without saving your modifications.
To delete records, select them using the same checkboxes and selection links, and click the Delete selected rows button. The chosen records will be immediately removed from the database with no further confirmation.
To add a new record, hit the Add row button below the table. An additional row will appear containing empty text boxes for you to enter new details. Clicking Save will add the new record to the table and move the display so that you can see the new row. You can also click Cancel if you change your mind about adding a record.
Records are normally edited or added in text fields that appear in the table in the appropriate columns. If you are editing a table that contains a blob or text field, however, or if the Use vertical row adding interface module configuration option is enabled, a different layout is used. Text boxes for fields are listed in a separate box inside or below the table instead, with field name labels to the right. For text or blob fields, a text box is displayed so you can enter multiple lines of text if necessary.
18.189.43.211