I get the same message after adding your code at line 1:
SQL: SELECT * FROM products WHERE ' AND (ProductName LIKE \\\'%mug%\\\') AND ((ProductCategoryID = 2))'
I'm uploading a fresh copy of my products_Excel.php page.
New live URL here: products_Search.php
Ragards
Rune