Laravel this is not only a practical framework, it is also a programming style
How to write a request for such a plan
SELECT T1.id, T1.name_ua, (SELECT COUNT(*) FROM categories T2 WHERE T2.parent_id = T1.id) AS children_count FROM categories T1 WHERE parent_id = 0
Aucun commentaire:
Enregistrer un commentaire