小编moh*_*ati的帖子

MySQL搜索产品及其属性

我有一个MySQL数据库,其中包含带有组/属性的产品/我创建了一个数据样本

http://sqlfiddle.com/#!2/7d8a04/1

create table products (
  id int(10),
  title varchar(50)
);
create table attributes (
  id int(10),
  title varchar(50)
);
create table filters (
  id int(10),
  attribute_id int(10),
  title varchar(50)
);
create table product_filters (
  id int(10),
  product_id int(10),
  attribute_id int(10),
  filter_id int(10)
);

#products
insert into products select '1', '1stphone';
insert into products select '2', '2ndphone';
#attributes
insert into attributes select '1', 'ram';
insert into attributes select '2', 'cpu';
insert into attributes select '3', 'hdd';
#filters
insert into filters …
Run Code Online (Sandbox Code Playgroud)

mysql search entity-attribute-value

3
推荐指数
1
解决办法
578
查看次数

标签 统计

entity-attribute-value ×1

mysql ×1

search ×1