#pdo
2 posts tagged pdo. Clear filter
-
How to Use Named Variables with Postgres and PHP PDO Driver
You can write reusable scripts with Postgres by taking advantage of named variables. A named variable starts with a : in your sql script. Here is an example select :anumber You can then use this...
-
Connect to Postgres on Heroku using DATABASE_URL Config Var with PHP and PDO
Unfortunately PHP's PDO constructor doesn't take a database connection url (in a format that Heroku makes available as a config var) as an argument. It has its own, rather odd syntax. However, it's...