Magentix
if (OP.statement == false) postCount++;
- Reaction score
- 107
Simple situation:
- Object A, B and C have an ID, some properties and a 'parent' property
- C has B as a parent, B has A as a parent and all is well in the application's kingdom
- In comes the evil witch who cast a vile spell making A have C as a parent
- Horror ensues
Or, in regular English:
How do I prevent (or check for) recursiveness in a MySQL database in a parent-child dictionary-like data tree.
Example table fields:
- ID (int ai pk)
- term (varchar)
- parent (int)
- Object A, B and C have an ID, some properties and a 'parent' property
- C has B as a parent, B has A as a parent and all is well in the application's kingdom
- In comes the evil witch who cast a vile spell making A have C as a parent
- Horror ensues
Or, in regular English:
How do I prevent (or check for) recursiveness in a MySQL database in a parent-child dictionary-like data tree.
Example table fields:
- ID (int ai pk)
- term (varchar)
- parent (int)