In order to do matches on partial search terms you have to add some wildcards to your queries, the %
:
SELECT * FROM products WHERE name COLLATE UTF8_GENERAL_CI LIKE '%" . $term . "%' OR brand COLLATE UTF8_GENERAL_CI LIKE '%" . $term . "%' LIMIT 0 , 30"
You could just add COLLATE UTF8_GENERAL_CI
to your column definitions and then you would not have to modify your queries. For example:
ALTER TABLE products MODIFY COLUMN name VARCHAR(...) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI.
If you need something more complex you will want to look a fulltext searches.
The Latin collation (LATIN1_GENERAL_CS
)is one of those which is known to work well with case insensitive searches. If the one I specified (I try to always use UTF-8) doesn't work, substitute the Latin collation.