Displaying 1 result from an estimated 1 matches for "sections_sections".
2006 Feb 27
1
How to build a recursive parenting structure?
...ething I''m trying 
to do now is create a site that has "sections" each section then could 
have a sub "section".
So I built a "sections" table and in the model I included the line 
"has_and_belongs_to_many :sections"
I also made a table called "sections_sections" to build the heirarchy 
however the fields I generated were:
CREATE TABLE  `sections_sections` (
 `section_id` INT( 10 ) UNSIGNED NOT NULL,
 `parent_id` INT( 10 ) UNSIGNED NOT NULL ,
 constraint fk_parents foreign key (parent_id) references sections(id),
 constraint fk_sections foreign key (...