搜索android和php中搜索栏的查询作为后端

i am developing an android shopping app in which i have taken a search bar to search products like search by brand, or size, or by name etc. I am using php as a backend for the application i.e. web services in php. what query should i use for this search by brand or by name in this scenario ?

for search by brand

select * from productstable where brand in ('a','b','c','etc') AND Productname like '%name%';

for search by size

select * from productstable where size in (1,2,3,4) AND Productname like '%name%';

name is the text you are searching for