Slashdot Mirror


Beginning PHP and MySQL

norburym writes "W. Jason Gilmore and Apress have put together an impressive volume, both in girth and content, in Beginning PHP 5 and MySQL, From Novice to Professional. At first glance, it appears that any technical manual that tries to approach such heady stuff such as PHP and MySQL for an audience ranging the span from beginner to the uber-geek is headed for failure. Happily, I can report that Gilmore and Apress have given the world one book that will replace many other PHP and MySQL volumes. This is one that the reader will consistently rely on and keep near to hand." Read on for the rest of Norbury-Glaser's review. Beginning PHP and MySQL: From Novice to Professional author W. Jason Gilmore pages 800 publisher Apress rating 9 reviewer Mary Norbury-Glaser ISBN 1893115518 summary PHP and MySQL

One key to the book's success is the manner in which Gilmore approaches his subjects. The text is split neatly into three sections: the first deals exclusively with PHP and comprises the bulk of the book's content, the second section goes into depth with MySQL and the final chapters deal with PHP/MySQL integration. This layout is where the promise of appealing to such a wide range of user abilities succeeds admirably. The beginner can read cover to cover and come out of the pipe with a solid, practical knowledge of PHP, MySQL and how to combine the two to build advanced web applications. An experienced MySQL or PHP guru can skip the area of his expertise and gain much from the chapters on the other. A more advanced user can use this book as reference material, skim the chapter outline, pick and choose topics of interest and quickly find the answers they seek. Everything is cleanly written, with little or no anecdotal filler or asides. Each chapter begins with a nice overview of what will be covered and ends with a brief but concise summary.

Gilmore begins with nine chapters specific to the PHP language and its many core features and extensions, taking particular care over installation and configuration issues (platform specific instructions are included for UNIX/Linux (Mac OS X users can swim in this pool very easily) and Windows), basics (data types, variables), functions, arrays, PHP's object-oriented functionality and expressions. The next ten chapters delve deeper into PHP's file and operating system functions, web form integration, http authentication, file upload management, LDAP, session management (one of the best aspects of PHP and incredibly easy to use), Web Services (SOAP, SimpleXML extensions as well as NuSOAP and MagpieRSS -- cool stuff!), security and PHP's SQLite database extension. SQLite is an exciting multi-platform database engine that will most likely prove to be hugely popular in the near future. It's interesting to note that Apple plans to integrate SQLite into their next release of OS X, Tiger. Also of note is Gilmore's well-written chapter on PHP and LDAP. He provides an extremely competent introduction to LDAP and PHP's LDAP extension. If you work in an enterprise environment, this knowledge will become an integral part of your mindset and vocabulary.

The SQL section of the book is compact and concise. Gilmore manages to take the reader through a fast but detailed introduction to MySQL. Installation and configuration, clients (the standard set and some GUI based administration clients), table structures and security/user management are all explained with precision and an eye toward practical expectations.

Chapters 26 through 30 stand out, with an integrated approach to both PHP and SQL. This is where Gilmore pulls it all together. The reader is introduced to PHP's MySQL functionality, creating MySQL database classes, indexing and searching, transactions and importing and exporting data. There are numerous excellent real-world examples throughout this section that will enable the reader to create elegant, advanced web applications.

Gilmore removes the complexity and ambiguity inherent in many technical books and gives the reader a detailed approach to these two wildly popular open source packages. Beginning PHP 5 and MySQL will definitely serve the novice, the professional and those in between. For anyone wondering what all the fuss is about with PHP or MySQL or for anyone who has wanted that one volume that will explain it all, this is definitely the book for you. It is at once an excellent tutorial and an indispensable reference manual.

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

10 of 228 comments (clear)

  1. Re:I used to swear by MySQL by Anonymous Coward · · Score: 1, Funny

    yeah .. i used to swear by mysql as well .. then
    i tried out postgres and ditched mysql .. then
    after watching postgres' query logic bomb out on
    things that mysql easily handled i ditched postgres
    completely and moved back to mysql

    screw postgres .. if i need a trigger i'll buy
    a glock

  2. Re:Switch from asp - php(5) by Anonymous Coward · · Score: 2, Funny

    I'm a good asp programmer with a lot of access and sql server experience

    You have condolences.

  3. Re:php & mysql & heady? by Saeed+al-Sahaf · · Score: 1, Funny
    for any real programmer all of php and mysql could be covered in incredible detail in about a 3 page brochure.

    Very tiny letters?

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
  4. Re:Switch from asp - php(5) by Anonymous Coward · · Score: 3, Funny

    Either you just got slashdotted or you really need to join the rebellion hasta pronto. :)

    thec.org reads as follows:

    Microsoft JET Database Engine error '80004005'

    Unspecified error /include/session.asp, line 9

  5. Re:Books? by Anonymous Coward · · Score: 1, Funny

    I have a colleague who put a hinged laptop tray and a LAN jack in his home john.

    An anecdote, NOT an endorsement!!!

  6. Re:register_globals = off by Ford+Prefect · · Score: 4, Funny

    magic_quotes_gpc = On

    Switch the damn thing off. It\'s a bloody annoying hack which may (or may not be) switched on for a particular web host, meaning that for security reasons your code has to check whether it's switched on or off, and massage data accordingly. :-)

    I\'ve got two functions which automatically strip incoming data of any added escaping, because with my form validation stuff the text may either go into an SQL query or back into the form again, with missing fields highlighted. Text might have come out of the database sans escaping, for editing purposes, and I don't want to have to write my forms code to treat data differently depending on its source. If everything\'s plain, unescaped text, it makes things so much simpler...

    A couple of simple rules - firstly, when creating a database query, always (integer )$record_id or '".mysql_escape_string( $input_string )."' all variables in your queries, having previously checked them for sanity.

    Secondly, keep as much code as possible in defined functions, out of the scope of register_globals idiocy. Yes, it can be switched off, but always assume that it's switched on, and is your enemy. Plus, it's a lot easier to track incoming data in your code when it's all defined at the beginning...

    page_record_input( ACTION_EDIT, array_unescape( $_POST['input_record'] ), (integer )$_GET['record_id'] );

    And lastly, always assume that your users are out to get you. Validate all data, and assume everything and everyone is hostile. :-)

    --
    Tedious Bloggy Stuff - hooray?
  7. Problems while reading the book. by Mr_Icon · · Score: 4, Funny

    Something I've noticed: if you flip the pages too fast, they all become blank with the only message showing:

    Warning: mysql_connect(): Too many connections in /usr/hand/book.php on line 4431.

    --
    If you open yourself to the foo, You and foo become one.
  8. Re:Don't count your hits before they match by enilnomi · · Score: 3, Funny

    Ah yes; 500 PHP and MySQL books...the two I found most valuable were "Spain for Dummies" and "Zen Vegetarian Cooking."

    500 seemed an excessive number to me as well, so I took the unorthodox step of actually checking the hits. Of the 301 hits I got when searching Amazon "books" for "php and mysql" there were about 30 titles actually written on the topic of php and mysql; another 30 or so were concerned with Dreamweaver MX and Macromedia MX; perhaps 30 were about web design or MacOSX or optimizing for search engines or .net...the rest were all Dummies books, ranging from GRE prep to DisneyWorld.

    Here's a URL for future reference; it's the #1 hit out of 4229 for "Amazon for Dummies".

    S2
    --
    education is no substitute for intelligence
  9. Re:Why MySQL? create user foo createdb; by Palarran · · Score: 2, Funny

    Funny, I feel the same way about people who use PHP. They seem to have no concept of variable types, or memory allocation, or anything. *g*

    On the other hand, I only feel like I have a handle on about half of the concepts you mention - care to suggest a good place for me to learn more?

  10. Finally! by Qbertino · · Score: 2, Funny

    Finally someone writes a book on PHP and MySQL. And it's even a newbie book on PHP and MySQL! Now I can get to learn this high-end stuff. Crickey, that's so cool.
    BTW: I actually plan do do something really cool: I wanna write a Web-CMS in PHP and MySQL. How does that sound, hmm?

    --
    We suffer more in our imagination than in reality. - Seneca