this sql:
SELECT * FROM products WHERE ProductStatus <> 10, INNER JOIN productsubcategories ON products.ProductCatID = ProdSubCatID ORDER BY ProdSubCatID, ProductSortOrder ASC
is not correct.
the where statement needs to be before the Order by statement:
SELECT * FROM products , INNER JOIN productsubcategories ON products.ProductCatID = ProdSubCatID WHERE ProductStatus <> 10 ORDER BY ProdSubCatID, ProductSortOrder ASC
or:
SELECT * FROM products , INNER JOIN productsubcategories ON products.ProductCatID = ProdSubCatID WHERE ProductStatus = 10 ORDER BY ProdSubCatID, ProductSortOrder ASC