Jump to content

Menu System with mySQL


kickassamd

Recommended Posts

Sure you would have 2 tables?

 

One with parent and one with child menus then have the display the parent manue and any child menu with the parent's ID?

 

Something like:

 

tbl_parent

-pid

-pname

 

tble_child

-cid

-pid

-name

 

I am no tables expert but that is how I would approach it.

tbl_menu

-id

-name

-link

-cid

 

------------------------------------

| id  | name  | link          | cid    |

------------------------------------

| 1    | home  | home.php  | 0      |

| 2    | sub    | hsub.php  | 1      |

| 3    | new    | new.php  | 0      |

|4    | newsub| nsub.php  | 2      |

------------------------------------

 

did it make any sense?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.