Add bounds checks so that PDO doesn't try to get a column that doesn't exist

Fixes "Fatal error: Unexpected object type Unknown." errors when calling
fetchColumn() with an invalid column number"

Test Plan: Add new test for both valid an invalid column numbers