Notice: Undefined index: srchMode in /home/firms4sale/public_html/searchListings.php on line 684
ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sec=592 in (tbllistings.SectorID,tbllistings.SecondSectorID)) ORDER BY Listin' at line 1

QUERY: SELECT tbllistings.ListingID, tbllistings.ListingType, tbllistings.Title, tbllistings.GeneralSummary, tbllistings.AskingPriceMin, tbllistings.AskingPriceMax, tbllistings.SalesRevenueMin, tbllistings.SalesRevenueMax, tbllistings.NetProfitMin, tbllistings.NetProfitMax, tbllistings.Obsolete, country.currency, IFNULL(country.countryname, "Undisclosed") AS Country, IFNULL(region.regionname, "Undisclosed") AS Region, IFNULL(tblsector.Sector, "Undisclosed") AS Sector, IFNULL(tblsubsector.SubSector, "Undisclosed") AS SubSector, IFNULL(secondsec.Sector, "Undisclosed") AS SecondSector, IFNULL(secondsub.SubSector, "Undisclosed") AS SecondSubSector, IFNULL(comprop.SubSector, "Undisclosed") AS CommercialProp, IFNULL(bizop.SubSector, "Undisclosed") AS BusinessOp, IFNULL(IFNULL(country.shortname, country.countryname), "Undisclosed") AS ShortCountry ,IFNULL(country.countryid, 0) AS CountryID, IFNULL(region.regionid, 0) AS RegionID, IFNULL(tblsector.SectorID, 0) AS SectorID, IFNULL(tblsubsector.SubSectorID, 0) AS SubSectorID, IFNULL(secondsec.SectorID, 0) AS SecondSectorID, IFNULL(secondsub.SubSectorID, 0) AS SecondSubSectorID, IFNULL(comprop.SubSectorID, 0) AS CommercialPropID, IFNULL(bizop.SubSectorID, 0) AS BusinessOpID FROM tbllistings LEFT JOIN tblusers ON tbllistings.UserID = tblusers.UserID LEFT JOIN tblbrokers ON tblusers.BrokerID = tblbrokers.brokerID LEFT JOIN country ON tbllistings.CountryID = country.countryID LEFT JOIN region ON tbllistings.RegiID = region.RegionID LEFT JOIN tblsector ON tbllistings.SectorID = tblsector.SectorID LEFT JOIN tblsubsector ON tbllistings.CategoryID = tblsubsector.SubSectorID LEFT JOIN tblsector secondsec ON tbllistings.SecondSectorID = secondsec.SectorID LEFT JOIN tblsubsector secondsub ON tbllistings.SecondCategoryID = secondsub.SubSectorID LEFT JOIN tblsubsector comprop ON tbllistings.CommercialPropID = comprop.SubSectorID LEFT JOIN tblsubsector bizop ON tbllistings.BusinessOpID = bizop.SubSectorID WHERE (tbllistings.Active AND tblusers.Active AND IFNULL(tblbrokers.Active, tbllistings.Active)) AND (CASE WHEN tblusers.BrokerID > 0 THEN tbllistings.DateAdded <= tblbrokers.ExpiryDate ELSE tbllistings.ExpiryDate >= "2019-12-06" END) AND (51⊂sec=592 in (tbllistings.SectorID,tbllistings.SecondSectorID)) ORDER BY ListingID desc

WHERE: (51⊂sec=592 in (tbllistings.SectorID,tbllistings.SecondSectorID))

ORDER: ORDER BY ListingID desc