PDO unbuffered queries

Please note that you should not use exec() to check if a post existed! You should prepare()/execute() instead, using ? in the query, instead of a variable, while variable itself have to be moved into execute().