How to encode crackers (php kohana framework)?

Is a good way to code breadcrumbs?

  • create category tables using mysql
  • create columns of the parent_id column as necessary
  • If the parent_id column is null, this means that this category is the parent, and otherwise, this parent column is the column with the identifier that is marked in the "parent_id" column
  • recursive query on the column "parent_id", starting with the current column and the name of the print category. A.
+3
source share
2 answers

Puzzles are easier if you use other methods of storing hierarchical data.

. SQL PHP :

+1

Travers Tree Traversal

  • Sprig MPTT github.com/banks/sprig-mptt
  • Jelly MPTT github.com/AlexKupreev/jelly-mptt
  • v3 ORM MPTT github.com/kiall/kohana3-orm_mptt
  • v2 ORM MPTT dev.kohanaframework.org/projects/mptt
+1

Source: https://habr.com/ru/post/1759592/


All Articles