[thelist] PHP/MySQL -- is this the best book to buy?

mary diamond mdiamond at mum.edu
Wed Oct 30 10:28:01 CST 2002


--
[ Picked text/plain from multipart/alternative ]
I have this book and can't compare it to others, since its the only one I have & use.
the coding in it is good in some ways and not in others.

If you want valid html output, you'll have to go thru the code and correct it, for missing quotes mostly.
He seems to like to echo lots of html that has a few little $somevars within it, rather than using <?=$somevar?> to echo those individual values into the html code and reduce the load on the parser.

In his sql statements he often ignores the deleterous effect line breaks have on the parsers ability to read the code, and he likes those line breaks.
example:
this...
$query = "select customerid from customers where
            name = '$name' and address = '$address'
            and city = '$city' and state = '$state'
            and zip = '$zip' and country = '$country'";
needs to be like this...
$query = "select customerid from customers where ".
            "name = '$name' and address = '$address' ".
            "and city = '$city' and state = '$state' ".
            "and zip = '$zip' and country = '$country'";
to work.

Other than that its a really good book. I'm not a programmer and I've learned a lot from it (via the immersion method) on developing pretty clean modularized code.
HTH

Mary Diamond

--




More information about the thelist mailing list