Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在mySql中搜索所有字段_Php_Mysql - Fatal编程技术网

Php 在mySql中搜索所有字段

Php 在mySql中搜索所有字段,php,mysql,Php,Mysql,我想搜索表中的所有字段​​ MySQL数据库中的tblproduct指定字符串,可能使用以下语法: 从tblproduct中选择*,其中*类似于“%textbox%” 可以这样做吗?试试这个 合并字段以搜索整个表 Select * from tblproduct where Concat(field1, '', field2, '', fieldn) like "%textbox%" 或 在mysql中使用匹配和对抗 SELECT * FROM tblproduct WHERE MATCH

我想搜索表中的所有字段​​ MySQL数据库中的tblproduct指定字符串,可能使用以下语法:

从tblproduct中选择*,其中*类似于“%textbox%”

可以这样做吗?

试试这个

合并字段以搜索整个表

Select * from tblproduct  where Concat(field1, '', field2, '', fieldn) like "%textbox%"

在mysql中使用匹配和对抗

SELECT * FROM tblproduct  WHERE MATCH (field1, field2, field3) AGAINST ('textbox')
试试这个

合并字段以搜索整个表

Select * from tblproduct  where Concat(field1, '', field2, '', fieldn) like "%textbox%"

在mysql中使用匹配和对抗

SELECT * FROM tblproduct  WHERE MATCH (field1, field2, field3) AGAINST ('textbox')

你是说在所有栏目上搜索是全文搜索。这个问题已经在这里得到了回答
SELECT*FROM WHERE(使用utf8转换)比如“%textbox%”或者CONVERT(使用utf8转换)比如“%textbox%”或者……。
检查这个答案中显示的技术:你的意思是在所有列上搜索全文搜索。这个问题已经在这里得到了回答
SELECT*FROM WHERE(转换(使用utf8)如“%textbox%”或转换(使用utf8)如“%textbox%”或………
检查此答案中显示的技术: