Skip to content

Instantly share code, notes, and snippets.

@kikegarcia
Last active December 20, 2015 05:29
Show Gist options
  • Save kikegarcia/6078858 to your computer and use it in GitHub Desktop.
Save kikegarcia/6078858 to your computer and use it in GitHub Desktop.
Query ML búsqueda tags
SELECT pl.name, pl.id_product, price
FROM ps_product p
LEFT JOIN ps_product_lang pl ON p.id_product = pl.id_product
WHERE pl.id_lang = 1 AND p.id_product IN (
SELECT pt.id_product
FROM ps_product_tag pt, ps_tag pp
WHERE pp.name REGEXP "[[:<:]]Cuerpo|hasta25[[:>:]]" AND pt.id_tag=pp.id_tag)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment