Friday, July 28, 2006

Errata #1

And we have our first Errata:

On page 294 & 295, Listings 14.1.1 & 14.1.2 ... These are some sample code showing how to use PHP to access MySQL.

Unfortunately one of the column names used:
desc

Is a reserved word in MySQL. The simplest fix is just to change all references to that column from desc, to descr.

I've already done this to the online versions of the code, so you might just want to download them here:
Updated Listing 14.1.1
Updated Listing 14.1.2

4 Comments:

Blogger Unknown said...

Errata on errata

Line 20 of 14c01-2.php should be:

$sql = 'select id, descr from tools order by id asc';

cheers

7:19 AM  
Blogger Unknown said...

This comment has been removed by the author.

8:13 PM  
Blogger Cosmin Poiana said...

Another errata is at listing 3.1.1 . The parameters in the mktime functions are $a_parts['mon'],$a_parts['mday'],etc and not $a_dt['mon'].

4:28 AM  
Blogger Dan Tsui said...

I tried using http://eliw.com/books/php5inpractice/view.php?file=code/16-email/16c03-2.php for different mail servers and it does not work right. I'm wondering if there's some restriction against potential abusers as there is no authentication needed in the script.

Doing a few echo statements I either get for port 25

ERROR: Bad Response
Expected: '250' Received: '553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1) '

or for port 465 (SSL):

ERROR: Bad Response
Expected: '250' Received: '454 TLS connection failed: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol (#4.3.0) '

Any ideas?

12:34 PM  

Post a Comment

<< Home