modified mysqlGetPad() to retrieve data correctly.