Database Improvements

Ongoing work to replace all of TheyWorkForYou's raw queries with nice shiny PDO prepared statements.
Does this work? Will it not escape all the IDs as one string that happens to contain commas?