This question has already been answered:
There are 3 tables: Products, attributes, id attribute values are known. You need to output products according to certain attribute parameters.
$sql = "SELECT g.id, g.title FROM goods g LEFT JOIN attr_values attr_v ON g.id = attr_v.id_goods WHERE ( ((attr_v.id_attr, attr_v.value) = (1, 'параметр...')) AND ((attr_v.id_attr, attr_v.value) = (2, 'параметр...')) ) "; As a result, I get an empty result = ((What is the problem and how can I rewrite the request, preferably for working with a large amount of information Thanks in advance
ANDisИ, how can an attribute have anidequal to both 1 and 2?ORmust be used - BOPOH