Databases Reference
In-Depth Information
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 the value of each field. The WHERE clause might even
prevent the correct execution of the DELETE operation, especially if there are TEXT or
BLOB fields, because the HTTP transaction used to send the query to the web server
may be limited in length by the browser or the server.
Deleting Many Rows
A feature added to phpMyAdmin in version 2.5.4 is the multi-row delete. Let's say
we examine a page of rows and decide that some rows have to be destroyed. Instead
of deleting them one by one with the Delete link or icon—and because sometimes
 
Search WWH ::




Custom Search