This document lists the known errors for the book:
MySQL
Paul DuBois
New Riders Publishers
1999
The document is maintained by Paul DuBois, paul@snake.net. Please report to that address any errors you find in the book that are not already listed here.
The current version of this document is available at the MySQL Web site, in the Examples area.
The output from some of the example queries in Chapter 1 differs from what you will see if you run the queries yourself. This is because I changed some of the sample data, but forgot to change a few of the examples in the book. There are also a couple of instances where you may see different output, depending on your version of MySQL. The corrected output for such examples is shown below.
The version number shown in the final column will depend on the version of MySQL that you are running.
The output should look like this:
+-----------+-----+------------+ | name | sex | student_id | +-----------+-----+------------+ | Megan | F | 1 | | Joseph | M | 2 | | Kyle | M | 3 | | Katie | F | 4 | ...
The output should look like this:
+-----------+ | name | +-----------+ | Megan | | Joseph | | Kyle | | Katie | ...
The output should look like this:
+-----------+-----+------------+ | name | sex | student_id | +-----------+-----+------------+ | Megan | F | 1 | | Joseph | M | 2 | | Kyle | M | 3 | | Katie | F | 4 | ...
The output should look like this:
+------------+----------+-------+ | student_id | event_id | score | +------------+----------+-------+ | 5 | 3 | 97 | | 18 | 3 | 96 | | 1 | 6 | 100 | | 5 | 6 | 97 | | 11 | 6 | 98 | | 16 | 6 | 98 | +------------+----------+-------+
The output will vary depending on the value returned by
the RAND() function.
The output is missing from the book. It should look like this:
+-----------+------------+ | last_name | first_name | +-----------+------------+ | Polk | James K. | | Taft | William H. | | Ford | Gerald R | | Bush | George W. | +-----------+------------+
The rows of the output are reversed. They should look like this:
+-----+----------+ | sex | COUNT(*) | +-----+----------+ | F | 15 | | M | 16 | +-----+----------+
The query produces no more lines of output than are shown. The "..." is incorrect.
Change the query that says:
SELECT birth_date FROM ...
To:
SELECT birth FROM ...
Change:
The tables in the samp_db table are relatively ...
To:
The tables in the samp_db database are relatively ...
And change:
If you edit samp_db to display tables from ...
To:
If you edit samp_browse to display tables from ...
add_new_event()
function.
There is an instance of addslashes() written incorrectly as
$addslashes().
Change:
addslashes ($date), $addslashes ($type));
To:
addslashes ($date), addslashes ($type));
SIN() function.There should not be two bullets for the SIN() function.
The text of the second SIN() bullet is part of the
preceding description.
Change:
For example, (4*3)/(4-2) evaluates to the value 2.
To:
For example, (4*3)/(4-2) evaluates to the value 6.
The state abbreviation for Arkansas is AR, not AK. Change the AK in the three listings to AR.