Data binding in PDO to allow postgres as backend data storage.

Replaced explicit SQL search terms with data binding to remove SQL injection risk and database escape quote dependancy. Allows PDO storage to be used with Postgres