Fix delete message function with PDO