#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    5
    Rep Power
    0

    Question PDO Tutorials/Books


    Hey everyone, I've recently been getting in to using PDO as a database connector. Now, I've read here and there about it and some generic examples of using it but I have yet to see any in depth tutorials or books that utilize PDO.

    I can't remember how many times I've picked up a book, or watched a video tutorial just to see them using mysql(i)_* connectors. Anyways, I was wondering if anyone could recommend some good online tutorials or books that actually create something using PDO?

    Thanks bunches!
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,112
    Rep Power
    9398
    The bookmark I've chosen to use in case someone asked this question was PDO Tutorial for MySQL Developers.
  4. #3
  5. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Hi,

    not sure what kind of in-depth explanations you expect, because writing complex applications has nothing to do with PDO. Both MySQLi and the old MySQL extension can easily be translated into the corresponding PDO code (except maybe for very special cases).

    For example, mysqli::prepare() and mysqli::execute() are directly equivalent to PDO::prepare() and PDO::execute() -- the methods even share the same names. The old extension is a bit different, because it doesn't support prepared statements at all. But it should be fairly easy to translate a direct query into a prepared statement.

    The PDO interface itself is actually very simple and straightforward. Unless you're doing transactions, pretty much all you'll ever need is prepare() and execute() and from time to time one of the various fetch methods (though a PDO statement can be used directly in a foreach loop).
    The 6 worst sins of security How to (properly) access a MySQL database with PHP

    Why cant I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".

IMN logo majestic logo threadwatch logo seochat tools logo