Database Reference
In-Depth Information
UPDATE
webpage
SET
content = “My email is someone@nowhere.com”
The result of running the above is shown in Figure 8.2. You will notice that the UPDATE
command does not give you the normal results grid, as the command changes data but
does not return it. The only feedback that you get is in the status bar at the bottom of the
box.
You will see in Figure 8.2 that for the above query it has matched and changed six rows.
This could be a problem as we only wanted to change the one row for the Contact Me page.
This example has been used to show how dangerous the UPDATE query can be without the
WHERE clause. Select everything from the webpage table again and you will see the results
of the unrestricted UPDATE, as in Figure 8.3. All of the content column cells have been
replaced with our email address.
Figure 8.1
Our content lacking webpage table.
Figure 8.2
When updating, feedback appears on the last line.
Search WWH ::




Custom Search