samedi 3 décembre 2022

How to make live checkbox filter with multiple category product?

I have 3 tables...

recipt table id, name

tags table id, name

taglist table product_id, tag_id

How can I create a filter that shows products that are in more than one category?

My product QUERY:

$query_recipe = "SELECT 
                        recipt.id AS recipt_id, recipt.name, recipt.cover,
                        GROUP_CONCAT(tags.name) AS tagname,
                        taglist.tag_id AS tag_id
                        FROM recipt
                        LEFT JOIN taglist ON recipt.id = taglist.recipt_id
                        INNER JOIN tags ON tags.id = taglist.tag_id
                        GROUP BY recipt_id";



Aucun commentaire:

Enregistrer un commentaire