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

...xist

Fixes "Fatal error: Unexpected object type Unknown." errors when calling
fetchColumn() with an invalid column number.