Book Image

Mastering phpMyAdmin 2.11 for Effective MySQL Management

Book Image

Mastering phpMyAdmin 2.11 for Effective MySQL Management

Overview of this book

Table of Contents (25 chapters)
Mastering phpMyAdmin 2.11 for Effective MySQL Management
Credits
About the Author
About the Reviewers
Preface

Deleting Data


phpMyAdmin's interface enables us to delete the following:

  • Single rows of data

  • Multiple rows of a table

  • All the rows in a table

  • All the rows in multiple tables

Deleting a Single Row

We can use the small X-shaped icon beside each row to delete the row. If the value of $cfg['Confirm'] is set to TRUE, every MySQL DELETE statement has to be confirmed before execution. This is the default, because it might not be prudent to allow a row to be deleted with just one click!

The form of the confirmation varies depending on the browser's ability to execute JavaScript. A JavaScript-based confirmation popup would look like the following screenshot:

If JavaScript has been disabled in our browser, a distinct panel appears:

The actual DELETE statement will use whatever information is best to ensure the deletion of only the intended row. In our case, a primary key had been defined and was used in the WHERE clause. In the absence of a primary key, a longer WHERE clause will be generated based on...