Created orderdetails database functions