Whet's the error / problem you're facing?
At least one problem you may encounter is if the text contains ' -characters, your concatenation won't result to a valid SQL statement. Use parameters instead:
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlparameter.aspx[
^].
Another thing is that if you're trying to get products per categories and product should always have a category, try switching the tables in the LEFT JOIN.
If there's some other error, post the error message in whole. If the error is logical, try describing what is the expected result etc.