I am receiving the following error when I visit http://www.flyclothing.com/fts_sitemap_cached.php
INVALID SQL: 1064 : 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 '-1' at line 1
SQL QUERY FAILURE: SELECT DISTINCT(p.productid), p.descr, p.product FROM xcart_products AS p, xcart_categories AS c, xcart_products_categories AS pc WHERE pc.productid = p.productid AND pc.categoryid = c.categoryid AND p.forsale = 'Y' AND (c.membership = '' OR c.membership ='') AND pc.categoryid = '22' ORDER BY orderby ASC LIMIT -1
The error just repeats with the pc.categoryid changing each time.
I repaired the databases, but nothing worked. I am not sure when it started to occur either, so I can't pinpoint any changes to the site caused the error.
Has anyone had similar issues and found a solution? Any help is gladly appreciated! Thank you.