Used outer join for admin viewpurchases.php