PHP+PDO+MySQL: How I’m doing it and a question…

Example of PHP+PDO+MySQL usage to select and update arbitrary fields. Only one prepared statement is used for updating the data.