User can search by Postcode (eg: L14, L15, L16) or Location from a textbox.
If user type in \"Liverpool\", it will find all the shops that are located in \"Liverpool
please try this:
SELECT DISTINCT shops.*, DA.delivery_cost, DA.postcode FROM shops JOIN shops_delivery_area as DA on DA.shop_id = shops.id WHERE DA.postcode = "Liverpool" OR (location = "Liverpool" and DA.postcode = shops.postcode)