Fixed an issue with Order History SQL.

Everything should work now.