Internal Server Error

TDbCommand failed to execute the query SQL "": SQLSTATE[42000]: Syntax error or access violation: 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 'OR tbl_Product.CategoryID=) AND tbl_Product.ProductIsActive = 'Active' AND tbl_P' at line 1

An internal error occurred while the Web server was handling your request. Please contact the webmaster to report this problem.

Thank you.