I have this query which orders all of the entries by MerchID.
if($result = $db->query_return("SELECT deal.merchID, deal.coupon, deal.expires, deal.expDate, deal.description FROM deals deal, deal_cats deal_cat WHERE deal_cat.catID='$c' AND deal_cat.dealID=deal.dealID ORDER BY deal.merchID"))
I would like to order the entries alphabetically by name which is in the merchants table.
The query above is only pulling from the deals table. Any idea how I can do this?