Topic: PHP/MySQL

Beginning PHP5, Apache, and MySQL Web Development (0764579665) cover image

Beginning PHP5, Apache, and MySQL Web Development

Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass
ISBN: 978-0-7645-7966-0
Paperback
816 pages
February 2005
View Previous Edition of This Title
If you are an instructor, you may request an evaluation copy for this title.
Paperback Version: US $39.99 Add to Cart

Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
112-113 Error in Text
On pages 112-113 the code should read the same as on page 111:

<?php
$movie=<<<EOD
<h2><center>Movie Review Database</center></h2>
<table width="70%" border="1" cellpadding="2"
cellspacing="2" align="center">
<tr>
<th>Movie Title</th>
<th>Year of Release</th>
<th>Movie Director</th>
<th>Movie Lead Actor</th>
<th>Movie Type</th>
</tr>
</table>
EOD;

echo $movie;
?>
05/24/2006
145-147 Error in Text
The 3rd table row structure starts...

<td bgcolor="#FFFFFF">Add what?</td>
Then on page 147 item 5 of the list refers to "Item Type" field
9/7/05
146 Error in Code
a <?php echo $foo; ?>
should be:
a <?php echo $foo ?>
9/7/05
160 Error in Text
Third Paragraph:
Note that the value part of the type element is composed of two different values, seperated by a semicolon.

should be:
Note that the value part of the type element is composed of two different values, seperated by a colon.
02/09/07
204-205 Missing Right Brace
Add the "}" after the code given below, this is the closing brace of else condition of if ($type > 3).

$insert = "INSERT INTO images
image_caption, image_username, image_date)
VALUES
'$image_caption', '$image_username', '$today')";
$insertresults = mysql_query($insert)
or die(mysql_error());

$lastpicid = mysql_insert_id();

// close the brace here
8/18/05
308, 320 Error in Source Code
(mysql_num_rows($result) > 0) { $row = mysql_fetch_array($result); $charlist[$row['id']] = $row['alias']; }

needs to be replaced by this: if (mysql_num_rows($result) > 0) { while($row = mysql_fetch_array($result)) { $charlist[$row['id']] = $row['alias']; } }
05/03/07