You are on page 1of 3

Corrections for

Murach’s PHP and MySQL (3rd Edition)


These are the corrections for the significant errors in each printing of this book. In
addition to the corrections listed here, you may find some trivial typos and formatting
errors. All types of corrections will be made in the next printing of the book.

How to tell which printing your book is in


Below the copyright notation on the back of the title page (page ii), you’ll find a series of
numbers like this:
10 9 8 7 6 5 4 3 2 1
The number on the right of this sequence tells which printing your book is. In this
example, it’s the first printing.
Corrections to the first printing
Chapter 2, page 49
In the first code example, the last two statements should substitute $list_price for
$subtotal like this:
$discount_amount = $list_price * $discount_percent;
$discount_price = $list_price - $discount_amount;

Chapter 2, page 51
In the last code example, the second line should start with be 3.7e-9, not 4.5e-9 like this:
3.7e-9 // equivalent to 0.0000000037

Chapter 2, page 65
In the last table, the first row should include a semicolon at the end of the ampersand
entity like this (&).

Chapter 2, page 76
The first sentence should say “zero or more times”, not “one or more times”.
In the fifth paragraph, the second to last sentence should say “updates the counter”, not
“increments the counter”.
In the eighth paragraph, the second sentence should say “$interest_rate”, not
“interest_rate”.

Chapter 5, page 165


All four instances of the OR operator (||) should be replaced with the AND operator (&&)
like this:
if ($product_id != NULL && $product_id != FALSE) {

and this:
if ($category_id != NULL && $category_id != FALSE &&
$product_id != NULL && $product_id != FALSE) {

Chapter 7, page 222


The second sentence should say “create a text area”, not “create a text box”.

Chapter 7, page 223


In the second bullet, the second sentence should say “the user presses”, not “the users
presses”.

Chapter 9, page 273


The third code example should use double quotes, not single quotes, like this
$names = implode("\t", $names);
Chapter 9, page 283
In the table, the description for first row should say “between $min and $max”, not
“between $lo and $hi”.
In the table, in the second and third rows, $min and $max should be in italics to show that
they are arguments that should be supplied by the programmer.

Chapter 10, page 299


In the first example, the last statement should result in a date of “02/29/2016”, not
“03/01/2016”.
In the second example, the fifth statement should result in a date of “Sun 08/13/2017”,
not “Sun 08/17/2017”.

Chapter 11, page 327


In the table, in the fifth row, the last sentence should begin with “Otherwise”, not “Other
wise”.

Chapter 12, page 360


In the third paragraph, the second sentence should say “the second example shows how”,
not “the second example show how”.

Chapter 12, page 372


In the fifth paragraph, the last sentence should say “submitted to the controller”, not
“submitted to the control).

Chapter 13, page 385


In the second to last line of code, both instances of
<br />

should be
<br>

You might also like