Errata

MySQL Cookbook

Errata for MySQL Cookbook

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 79
4th Real Paragraph (Skipping Code), First Sentence

The book states:

"PHP also provides a require statement that is like include except that PHP reads the
file even if the require occurs inside a control structure that never executes (such
as an if nlock for which the condition is never true)."

The PHP.net manual at http://www.php.net/require states:

"Note: Prior to PHP 4.0.2, the following applies: require() will always attempt to
read the target file, even if the line it's on never executes. The conditional
statement won't affect require(). However, if the line on which the require() occurs
is not executed, neither will any of the code in the target file be executed.
Similarly, looping structures do not affect the behaviour of require(). Although the
code contained in the target file is still subject to the loop, the require() itself
happens only once."

Anonymous