什么都不说话先来2个表
表一
表二
关系对应
然后如果要根据现有的条件查找
sql
ELECT goods_id from 表名 where (attr_id =10 and attr_value=’木制床’ ) or ( attr_id =17 and attr_value=’高箱床’ ) GROUP BY goods_id HAVING count()=2*(几个条件就是数字几)**
重点还在sql上!!
什么都不说话先来2个表
表一
表二
关系对应
然后如果要根据现有的条件查找
sql
ELECT goods_id from 表名 where (attr_id =10 and attr_value=’木制床’ ) or ( attr_id =17 and attr_value=’高箱床’ ) GROUP BY goods_id HAVING count()=2*(几个条件就是数字几)**
重点还在sql上!!