Loading
  1. SELECT DISTINCT
  2.                          trading_name.id_trading_name AS trading_id, trading_name.trading_name, trading_name.address1, trading_name.postcode, trading_name.tel, trading_name.email,
  3.                          access.access_id, access.access_name
  4. FROM            trading_name INNER JOIN
  5.                          access_trading ON access_trading.trading_id = trading_name.id_trading_name INNER JOIN
  6.                          access_staff ON access_staff.access_id = access_trading.access_id INNER JOIN
  7.                          access ON access_trading.access_id = access.id
  8. WHERE        (trading_name.deleted = 0) AND (access_staff.staff_id = 236) AND (trading_name.trading_name LIKE '%wright%')
  9. ORDER BY trading_name.trading_name

Comments