Fixed SQL queries for getEmailsByProductsOrdered and getTotalEmailsByProductsOrdered
(issue #742)
Merge pull request #750 from Eternity-Yarr/master

Issue #742 fix