MySQL and Perl for the Web - Errata

This document lists the known errors for the book:

MySQL and Perl for the Web
Paul DuBois
New Riders
2001
ISBN 0-7357-1054-6
[book information]
Number of items: 30
Date of most recently reported item: 2007-06-19

Sort by: [page number] [most recent errata first]
Date 2002-10-25
Page 23
Reported by David Partridge
Description

The sidebar at the bottom of the page shows a command incorrectly. It says:

C:\>
intro.pl

It should say:

C:\>
intro1.pl

Date 2006-02-23
Page 43, bottom of page
Reported by Jim Kovacs
Description The second line of the final example on the page has a typo. It says:
# select-user.pl - user current user's option file to connect
It should say:
# select-user.pl - use current user's option file to connect

Date 2002-11-11
Page 48
Reported by Linda Kuo
Description The listing for fatals.pl contains an error. The call to start_html() should be followed by a comma, not by a semicolon.

Date 2006-07-25
Page 57
Reported by Shaun Nicholson
Description The code in the first listing uses ORDER BY t DESC to sort entries with the most recent items first. However, the items shown in the second listing are in ascending order. They should be reversed.

Date 2006-03-30
Page 80, second paragraph
Reported by James Kovacs
Description "mod_perl_to_cgi" should be "cgi_to_mod_perl".

Date 2001-11-15
Page 81
Reported by Bruce Ferrell
Description The second bullet item on the page mentions an "Apache::DBdebugger" module. There is a space missing before "debugger", this should read "Apache::DB debugger" module.

Date 2001-12-06
Page 85
Reported by Mark Rajcok
Description The first paragraph under "Persistent Database Connections" says "preload the Apache::DBImodule from your mod_perl startup file". There is a space missing here. This should read "preload the Apache::DBI module from your mod_perl startup file".

Date 2002-02-15
Page 106
Reported by Zhangyuan Hu
Description In the sixth paragraph, "useCGI statement" should be "use CGI statement".

Date 2002-11-11
Page 130
Reported by Linda Kuo
Description The listing for display_entry_form() contains two errors. The name values for the Email address and Note fields both are set to "name". They should be "email" and "note", respectively.

Date 2003-10-08
Page 183, send_card() function listing
Reported by Xu, Qiang
Description The send_card() listing contains this code:
# if field is required but missing, it's an error
if (defined ($req_field_map{$key}) && $card_ref->{$key} eq "")
The defined() test is redundant, because the enclosing foreach() ensures that the argument is defined. The code can be simplified as follows:
# if field is required but missing, it's an error
if ($card_ref->{$key} eq "")

Date 2001-11-29
Page 198
Reported by Robert McAdams
Description The default value for the extras column is displayed incorrectly near the bottom of the page. The example lists the default value as cream,sugar; it should say NULL instead.

Date 2006-06-03
Page 200
Reported by Jim Kovacs
Description The description of the Null column says that the value if empty if the column cannot have NULL values. Current versions of MySQL display NO rather than the empty value.

Date 2004-02-04
Page 237, third and fourth bullets
Reported by Xu, Qiang
Description The third and fourth bullet items on this page refer to the coffee2 table. Both should refer to the coffee3 table.

Date 2004-02-05
Page 270, second paragraph, second sentence
Reported by Michael D. Schleif
Description Typo. The second sentence of the second paragraph begins "If fact"; it should say "In fact".

Date 2003-08-21
Page 281, code listing in mid-page
Reported by Chris M. Combes
Description Missing dash. In the code listing in the middle of the page, the line that begins with labels should begin with -labels.

Date 2004-02-07
Page 290, first paragraph, last sentence
Reported by Michael D. Schleif
Description Typo. print-price in the last sentence of the first paragraph should be print_price.

Date 2002-07-12
Page 300
Reported by Tianqing Liu
Description There is an off-by-one error in determining whether or not there is a next page, which can cause a next-page link to be generated erroneously if the last page contains exactly as many items as the page size. Change this line:
if
($start_pos+$page_size > $max_rec) # last page; no successor
To this:
if ($start_pos+$page_size >= $max_rec) # last page; no
successor

Date 2004-02-08
Page 308, listing at bottom
Reported by Michael D. Schleif
Description The listing for the gen_nav_bar() contains a declaration for a @bar variable. The declaration can be removed; the variable is unused.

Date 2002-08-14
Page 355
Reported by Jesse Sheidlower
Description Typo. The second bullet point says "applicatin must resend"; it should be "application must resend".

Date 2004-02-12
Page 365, process_answer() function
Reported by Michael D. Schleif
Description The $page variable in the process_answer() function should be initialized to the empty string. Otherwise, the function can return undef, resulting in a "Use of uninitialized value in concatenation" warning from Perl when the function result is used.

Date 2003-04-29
Page 393
Reported by Jesse Sheidlower
Description Typo. In the first paragraph of "Using Secure Connections," the word "Stonghold" should be "Stronghold".

Date 2002-02-12
Page 415
Reported by Jesse Sheidlower
Description The error message on line 5 of the page contains a typo. "bot" should be "both".

Date 2004-02-19
Page 437, last paragraph
Reported by Michael D. Schleif
Description The last paragraph indicates that if you want to store the PDF files in a different location, you'll need to change the pathname in doc_shop.pl and serve_doc.pl. That's incorrect; only serve_doc.pl needs to be changed.

Date 2007-03-26
Page 443, last paragraph
Reported by Shaun Nicholson
Description The reference to format_order_html() is incorrect. It should say format_items_html() instead.

Date 2007-06-19
Page 454, last paragraph
Description The reference to format_order_html() is incorrect. It should say format_items_html() instead.

Date 2001-11-08
Page 489
Description The URL given for the free version of cron for Windows has changed. Try http://www.kalab.com/freeware.htm instead.

Date 2001-11-15
Page 504
Reported by Cheryl Kellas
Description The filefiled() index entry is misspelled; it should be filefield().

Date 2001-12-15
Page 509
Description "get() method" entry applies only to 207-208. For 476, it should be a separate "GET method" entry.

Date 2001-12-15
Page 518
Description "POST() method" index entry should read "POST method".

Date 2001-08-03
Page inside back cover
Description The second URL, http://dbi.symbolstone.org/, should be http://dbi.perl.org/.

This document is maintained by Paul DuBois. Please report any errors you find in the book that are not already listed here.