Function for gettign data from a row