[英]Search all fields in mySql
I want to search all fields from tables tblproduct in MySQL database a given string, possibly using syntax as: 我想在MySQL数据库中的表tblproduct中搜索给定字符串的所有字段,可能使用以下语法:
SELECT * FROM tblproduct WHERE * LIKE '%textbox%'
Is it possible to do something like this? 有可能做这样的事情吗?
Try this.. 尝试这个..
concate fields to search whole table 连接字段以搜索整个表
Select * from tblproduct where Concat(field1, '', field2, '', fieldn) like "%textbox%"
or 要么
Using MATCH and AGAINST in mysql 在MySQL中使用MATCH和AGAINST
SELECT * FROM tblproduct WHERE MATCH (field1, field2, field3) AGAINST ('textbox')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.