MySQL server has gone away : SELECT EstDetails.*, Details.*, CountyDetails.CountyName, CountyDetails.CountyNameCut, CountyDetails.CountryID, hocounty, bcomregion, EstablishmentType.type AS ET, menus.web AS mweb, menus.menu AS mmenu, Country.Name AS country, specialoffers.heading, specialoffers.content, DATE_FORMAT(specialoffers.entered, '%a %D %b %Y') AS day, specialoffers.link, Towns.ID AS tid, Towns.latitude AS tlat, Towns.longitude AS tlong, christmasoffers.place FROM EstDetails INNER JOIN CountyDetails ON EstDetails.County = CountyDetails.RecordID INNER JOIN EstablishmentType ON EstablishmentType.ID = EstDetails.EstType INNER JOIN Details ON EstDetails.RecordID = Details.RecordID LEFT JOIN menus ON EstDetails.RecordID = menus.est LEFT JOIN Country ON CountyDetails.CountryID = Country.ID LEFT JOIN specialoffers ON specialoffers.placeid = EstDetails.RecordID LEFT JOIN Towns ON Towns.Name = EstDetails.Town AND Towns.County = EstDetails.County LEFT JOIN christmasoffers ON christmasoffers.place = EstDetails.RecordID and offeryear = 2020 WHERE EstDetails.RecordID = 104558