【发布时间】:2015-02-22 10:47:36
【问题描述】:
我有 4 个不同的表,分别命名为
ps_product
ps_product_lang
ps_category_lang
ps_manufacturer
ps_product的表是这样的
id_product id_manufacture id_category_default
1 1 5
2 1 7
3 1 9
4 1 10
5 1 11
6 1 11
ps_product_lang 是这样的
id_product name
1 Faded Short Sleeve T-shirts
2 Blouse
3 Printed Dress
4 Printed Dress
5 Printed Summer Dress
6 Printed Summer Dress
7 Printed Chiffon Dress
ps_category_lang 是这样的
id_category name
1 paints
2 Home
3 Women
4 Tops
5 T-shirts
6 Tops
7 Blouses
ps_manufacturer 表是这样的
id_manufacturer name
1 Fashion Manufacturer
现在我希望当我用like 选择名称时,它会显示这些名称中的数据。就像当我
将搜索'paint%' 之类的东西,然后它应该显示来自产品名称、产品类别和制造商名称的匹配名称
那么有人可以告诉我如何加入这些表来获取值吗?任何帮助和建议都会非常有效。谢谢
【问题讨论】:
-
我会设置 mysql 全文搜索以获得有效的解决方案。
-
在您搜索时显示您想要的表格输出,以便清楚您想要什么。
标签: mysql sql select join left-join