Welcome Guest, Not a member yet? Register   Sign In
Little help with database design (ecommerce, mysql)
#2

[eluser]Eric Barnes[/eluser]
I always set my categories up with a parent_id int field. Something like:
id, parent_id, name
1, 0, Parent
2, 1, Child of parent
3, 0, Another parent
4, 2, Child of child 2.
etc...

Then for the products I just have a normal products table that is used in the sorting. Possibly using a secondary product_fields table to hold special extra fields. But probably not needed.


Messages In This Thread
Little help with database design (ecommerce, mysql) - by El Forum - 05-07-2009, 06:35 PM
Little help with database design (ecommerce, mysql) - by El Forum - 05-07-2009, 07:45 PM
Little help with database design (ecommerce, mysql) - by El Forum - 05-07-2009, 07:51 PM
Little help with database design (ecommerce, mysql) - by El Forum - 05-07-2009, 10:57 PM
Little help with database design (ecommerce, mysql) - by El Forum - 05-07-2009, 11:14 PM
Little help with database design (ecommerce, mysql) - by El Forum - 05-07-2009, 11:36 PM
Little help with database design (ecommerce, mysql) - by El Forum - 05-07-2009, 11:48 PM
Little help with database design (ecommerce, mysql) - by El Forum - 05-08-2009, 05:12 AM
Little help with database design (ecommerce, mysql) - by El Forum - 05-08-2009, 05:22 AM
Little help with database design (ecommerce, mysql) - by El Forum - 05-08-2009, 04:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB