I'm trying to run a query using two variables that I passed over from a link the user clicked on. The two variables are 'Brand' and SubCategory. I for some reason cannot figure out why SQL is telling me I have an error in my syntax.
My query is
SELECT * FROM database WHERE Brand='$Brand' SubCategory='$SubCategory'
Everything looks fine to me, yet it tells me
SQL Error
:
Query failed with the following: (Error #1064) You have an error in your SQL syntax;
In the error message it even shows me the value of $Brand and $SubCategory, so I know its not a problem with the values being passed over between the pages.;