SQL Error Unknown column 'curr' in 'field list'