mysql 搜索查询的多个选择语句 [英] Multiple select statements for mysql search query
本文介绍了mysql 搜索查询的多个选择语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以在一个查询中对不同的表使用 select 语句吗
can i use select statements for different tables in a single query
SELECT *
FROM users
WHERE first_name LIKE "%'.$search_string.'%"
OR last_name LIKE "%'.$search_string.'%"
那是来自'users'表,我想在另一个名为sellers的表上做同样的搜索.卖家有相同的字段 first_name, last_name
thats from the table ' users' , i want to do the same search on another table called sellers. sellers have the same fields first_name, last_name
推荐答案
可以这样搜索select * from shirts where find_in_set('1','2,3,4,5,1')
You can search like this select * from shirts where find_in_set('1','2,3,4,5,1')
这篇关于mysql 搜索查询的多个选择语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文