andreysneg Posted February 4, 2020 Share Posted February 4, 2020 Example for search category by word . Category name - FINDME Rezult query is: SELECT c.id_category, c.id_parent, c.active, cl.name, cl.description, cs.position FROM ps_category c LEFT JOIN ps_category_lang cl ON c.id_category = cl.id_category AND cl.id_lang = 2 AND cl.id_shop = c.id_shop_default LEFT JOIN ps_category_shop cs ON c.id_category = cs.id_category AND cs.id_shop = 1 WHERE (cl.name LIKE '%FINDME%') AND (c.id_parent = '2') ORDER BY position asc LIMIT 100 OFFSET 0 SQL quaery hase always c.id_parent = '2' . Search only in Parent category. All subcategory imposible find. Search by ID dont work too. SQL must be without " AND (c.id_parent = '2') " Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now