Products
No Results
Sorry, I could not find any results for . Remove it to see more results.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND AND node.shop_id = 1 AND parent.shop_id=1 GROUP BY node.id HAVING depth < 2' at line 1
SELECT node.*, node.id, (COUNT(parent.id) - 1) AS depth FROM cat AS node, cat AS parent WHERE node.lft BETWEEN parent.lft AND parent.rgt AND parent.lft BETWEEN AND AND node.shop_id = 1 AND parent.shop_id=1 GROUP BY node.id HAVING depth < 2 ORDER BY node.lft