Errata

MySQL in a Nutshell

Errata for MySQL in a Nutshell

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 231
Code listing line 17

while(mysql_fetch_row($results)) {
should read:
while($row = mysql_fetch_row($results)) {

Anonymous   
Printed Page 255
lines 5-6

This sentence is more or less unintelligible: "The first line sets up the definition for MySQL, with mysql, which will be
referenced by mysql later."

Anonymous   
Printed Page 255
first line of code

As the code now stands, mysql is undefined when mysql_init is called, resulting in a blow-up; if you're lucky you get a
segmentation fault. Fix it by replacing this line of code

if(mysql_init(mysql) == NULL)

with these two lines of code:

mysql = mysql_init(NULL);
if (mysql == NULL)

Anonymous   
Printed Page 286
Table A-1

It looks as though Table A-1 was supposed to have been formatted with the name of the datatype (SMALLINT, BIGINT, etc.)
and size (2 bytes, 4 bytes, etc.) in the left column and the range of representable values in the right column. However,
the format of the table is corrupted starting with the MEDIUMINT row.

Anonymous