SELECT * FROM discounts WHERE discount_code='' AND company_id='1' ORDER BY Code_id DESC LIMIT 1