PHP Data Objects (PDO) provides a clear, simple, unified API for working with favorite databases. In this tutorial, we showed you how to query a BLOB in a PostgreSQL database using PHP. PHP 7 Example of using a blob in a PHP application 1. I will show examples for the every case so you can choose one that suits you best. You can rate examples to help us improve the quality of examples. Querying a Table. PostgreSQL 12. The statement is divided into a select list (the part that lists the columns to be returned), a table list (the part that lists the tables from which to retrieve the data), and an optional qualification (the part that specifies any restrictions).