Welcome Guest, Not a member yet? Register   Sign In
I need help with relationships between parent category and child category on a innodb engine.
#2

[eluser]weboide[/eluser]
I believe that for a foreign key to be optional, it has to be possible to set it to NULL (ie without NOT NULL).

Try with parent_id like this:
Code:
`parent_id` int(10) unsigned DEFAULT NULL

If there is no parent, just set parent_id to NULL or do not set it (as it is by default set to NULL)


Messages In This Thread
I need help with relationships between parent category and child category on a innodb engine. - by El Forum - 03-30-2010, 09:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB