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 ?
搜索android和php中搜索栏的查询作为后端
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- doucai5315 2016-07-06 06:02关注
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
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥20 usb设备兼容性问题
- ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
- ¥15 安装svn网络有问题怎么办
- ¥15 Python爬取指定微博话题下的内容,保存为txt
- ¥15 vue2登录调用后端接口如何实现
- ¥65 永磁型步进电机PID算法
- ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
- ¥88 找成都本地经验丰富懂小程序开发的技术大咖
- ¥15 如何处理复杂数据表格的除法运算
- ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)