Slashdot Mirror


PHP and MySQL Web Development, 2nd Edition

honestpuck writes with the short review below of Sams' PHP and MySQL Web Development, 2nd Edition, which he says is aimed at "someone who has programmed before needs to know about both PHP and MySQL," and a good book for the intended audience. Read on for his thoughts on the book. PHP and MySQL Web Development author Luke Welling & Laura Thomson pages 815 publisher Sams rating 9 reviewer Tony Williams ISBN 067232525X summary New edition to for an excellent guide to PHP and MySQL

There is a good review of the first edition of this book here on Slashdot. For this second edition, I would add that Welling and Thomson have updated extensively and improved slightly a book that may well be the classic text on the topic.

PHP and MySQL are probably the most pervasive add-ons to Apache web servers across the web. Certainly they are both easy to acquire and common on a large range of web hosting systems, including several extremely low-cost ones. They also fit together extremely well.

This book demonstrates just how well. It starts out with a quick course in PHP (OK, 160 pages is hardly quick but it seems to move along at a good pace), follows it up with a brief look at MySQL before a short digression on E-commerce leads into building authentication and secure systems with the two tools (a marvelous place to start when you're thinking about commercial-grade web systems).

Then, after some more on PHP, the final section covers some large projects, a shopping cart, email service, mailing list manager and web forums. The final chapter in this section is new for this edition and covers XML and SOAP.

The new edition has been updated extensively. All scripts work now perfectly in PHP 4.3

I like this book a great deal. Even after a fair amount of time with the previous edition I still find it useful. It is well structured for finding what you need, well written, and has few typos. (Though there are still some, including ones in code examples -- when will authors learn to work straight off running code into the manuscript and keep godforsaken editors away from it? Brian Kernighan managed it twenty-five years ago.)

This would not be the best book if you had little programming experience, nor would it be the best book if you had a fair amount of PHP experience.

You will want to have some program design experience and preferably some experience with database design as these are given short shrift. The book also lacks examples and discussion of some of the less database intensive parts of PHP and some of the more obscure tasks you may need to perform. It covers what someone who has programmed before needs to know about both PHP and MySQL while informing on methods of using both to build practical and sturdy web applications. If that sounds like the book you want then I heartily recommend this volume to you.

You can purchase PHP and MySQL Web Development from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

8 of 172 comments (clear)

  1. PHP 5? by seangw · · Score: 2, Interesting

    Does anyone know if this book would include information in regards to PHP5? I'm looking for syntax / usage as well as the realistic ability to implement php5 in a production environment.

  2. backwards compat. by b17bmbr · · Score: 4, Interesting

    one of the problems with books like this is their lack of backwards compatibility. i used to have a safari subscription, and had this book for a while. 1st edition was very good. however, many hosting services still use 4.0.X. and for those places, that operate on thin margins, they see no reason to upgrade. it's not a cost issue, but an adminissue. i can't say that i blame them. so, books should also have some backwards compatibiltiy discussion. for instance: $_POST vs. $HTTP_POST_VARS. this will screw up lots of people. you will develop your site locally, mirror it, and then, "holy crap", it doesn't work."

    --
    My problem? I was perfectly gruntled, until some numbnuts came by and dissed me.
  3. Re:PHP is a mess - try out ZOPE by Christianfreak · · Score: 4, Interesting

    While I agree that the parent is wrong, PHP's error handling is still horrid because (at least by default) it outputs to the user of the page which could expose information to a hacker/cracker type person. I much prefer errors being logged where they can be later examined and the language should emit a 500 error to the client.

    And before someone says "I don't like the crappy page that gets sent on a 500 error", with Apache you can change that error to whatever page you want.

  4. i18n by Tony+Laszlo,+Tokyo · · Score: 5, Interesting

    Someone needs to write books that address the need to deal with multiple language, bidi and related issues. PHP and MySQL can handle more than most people think, but one thing holding the non-Latin-1 development back is a rather chronic case of Latin1-centricity.

  5. Re:Why not Online Documentation ? by slothdog · · Score: 2, Interesting

    Ok, then how about downloadable documentation?

  6. Re:Why not Online Documentation ? by gmuslera · · Score: 2, Interesting
    While the PHP and MySQL annotated documentations are excelent, they show how to use the tool, not what kind of things you can do with them. The focus of the book is not php nor mysql, is web development, using those tools, doing specific widely used task also, maybe implemented with php and mysql, I agree, but it cover a lot more than simply what are those tools.

    It teach a bit about php and mysql to be more complete and self-contained, but probably the online documentation of php and mysql would be better.

  7. knowing the language vs knowing the ins and outs by MattW · · Score: 4, Interesting

    I don't think I own a single PHP book. What I do for a living right now is code PHP+Mysql (specifically, e-commerce engine customization).

    I never had a problem with stuff not working, but I did do a lot of things in ways that could have been done better. For example, not realizing at first that you could declare php functions with optional arguments (ie, function foo($x, $y=1) {}) cost me a lot of headache I didn't need. Puzzling my way through the behavior of php classes took some time, as these aren't particularly well documented (particularly variable scope in classes and methods, and the interaction between session tracking and classes).

    In other words, I could have used a good 'tips and tricks' sort of book. Not basic syntax, but the sort of things you'd miss even if you got fairly far using the online docs.

    The good and bad thing about PHP+Mysql is that it is a very powerful and flexible platform to develop on. But because it is SO flexible, it lets you make a LOT of mistakes. There's a big difference between a functional app, and a GOOD app.

  8. Why PHP? by SharpFang · · Score: 2, Interesting

    I really wonder, why is PHP a language of choice for interacting with databases and writing HTML. I mean, it's not a bad language by itself, a bit like Perl, maybe slightly clearer (though personally I prefer Perl), maybe not as easy in common use... But it has one TERRIBLE drawback:

    Quotes and brackets.

    Nothing evil by themselves, they are unfortunately just the same kind as used in HTML and SQL, which makes creating SQL queries on the fly, printing HTML piece by piece and a lot of similar work worst mess I've ever seen. I've been successful at creating Perl regexp patterns that needs a minute to be understood, but I've never before been tempted to try to optimise fragments of my program to anything like:
    $a.='('.$_POST["it$f['n1'][$i]"]."='${q2}') ;";

    Is there any good CGI language that doesn't have this kind of problems?

    --
    45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2