Checking Validity of Database Queries

The query method now checks that a valid PDO::Statement is returned from
PDO queries; returns false otherwise.

The select method checks that select queries return valid response.