Below is a documented code example showing how to use the PDO classes/objects to connect and query your database (and check for errors).
If there are any questions, or you want to see different features, let me know.
UPDATE: I've encountered a problem with PDO and bit fields (MySQL). If you experience any problems with those I suggest changing the column type to TINYINT(1).