It's a bug in
DBD::mysql. If you got column info on the whole table, it would correctly return the position of each column. But since you are only getting info on one column at a time, the count starts with '1' each time. In the code, the ordinal position is a simple incremented variable for each column returned.