在最近的一个项目需要实现在单表中对多字段进行同一关键字的模糊查询,查了一下有点收获
select * from table where `字段`='值' and concat(`title`,`content`) like '%关键字%'
select * from table where `字段`='值' and concat(`title`,`content`) like '%关键字%'