Use PDO instead of deprecated MySQL API

Mainly because I'd like to use Postgres instead
Bugfix: array interpolation doesn't work here