Query failed in dbquery::Query2CSV
Select Distinct SitRecID FROM `species` INNER JOIN `spcsitepopulation` ON SpcPopSpcRecID = SpcRecID INNER JOIN `site` ON SitRecID = SpcPopSitRecID INNER JOIN `sitibacripopulation` ON SitCriPopSpcPopRecID = SpcPopRecID INNER JOIN `sitibacriteria` ON SitCriSumRecID = SitCriPopSitCriSumRecID INNER JOIN `lutgenus` ON SpcGenRecID = GenRecID INNER JOIN `lutfamily` ON GenFamRecID = FamRecID WHERE SitCriSumStaRecID = 4 AND
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 10