Database error: Invalid SQL: SELECT M.MLS_NUM, ListingKey, mls_is_pic_url_supported, M.ListPrice, M.PropertyType, M.SubType, M.Beds,M.Baths,M.Main_Photo, M.BathsFull, M.BathsHalf, M.SQFT, M.MLSP_ID, CONCAT(M.MLS_NUM,'-',M.MLSP_ID) As ListingID_MLS, M.YearBuilt, Subdivision, M.Description, TotalPhotos, Parking,M.Is_OpenHouse,M.Is_ShortSale,(DATEDIFF(CURRENT_DATE(), Listing_Created_Date)) AS DOM, A.StreetNumber, A.StreetName, A.StreetDirPrefix, A.StreetDirSuffix, A.CityName, A.State, ZipCode, DisplayAddress, O.Office_Name, AI.SaleType, AI.LotSize,AI.Sold_Price, A.StreetDirection, StreetSuffix, UnitNo, M.Parking, M.YearBuilt, A.Latitude, A.Longitude, AI.StatusChangeDate, AI.LastChangeType, (SELECT CONCAT(OH_Date,',',OH_Begins,',',OH_Close) FROM listing_open_house LMOH WHERE M.MLS_NUM = LMOH.MLS_NUM AND M.MLSP_ID = LMOH.MLSP_ID AND LMOH.OH_Date >= CURRENT_DATE() ORDER BY LMOH.OH_Date ASC LIMIT 1) AS open_house_data FROM listing_master AS M LEFT JOIN listing_address AS A ON M.MLS_NUM = A.MLS_NUM AND M.MLSP_ID = A.MLSP_ID LEFT JOIN listing_office AS O ON M.OfficeID = O.Office_ID AND M.MLSP_ID = O.Office_MLSP_ID LEFT JOIN mls_master AS MM ON M.MLSP_ID = MM.MLSP_ID LEFT JOIN listing_additional_info AS AI ON M.MLS_NUM = AI.MLS_NUM AND M.MLSP_ID = AI.MLSP_ID WHERE 1 AND Is_OpenHouse = 'Y' AND M.OfficeID NOT IN('') AND (A.Latitude != '' AND A.Longitude != '' AND A.Latitude != 0 AND A.Longitude != 0) AND ListingStatus = 'Active' AND M.is_mark_for_deletion = 'N' ORDER BY open_house_date asc LIMIT 0, 60
MySQL Error: 1054 (Unknown column 'AI.SaleType' in 'field list')
Session halted.