Re: Restaurant menu

From: Date: Sat, 22 Jul 2006 04:31:30 +0000
Subject: Re: Restaurant menu
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-239697@lists.php.net to get a copy of this message
Hey Craig, Place all items whatever way you want in a table. Its while presenting the menu, you have the query the database like: $query = "SELECT menu_id, menu_category, menu_item FROM $menu_name ORDER BY $menu_item_attribute "ASC"; You can choose multiple tables for menu_category, in which case you shall have to pull out a custom menu by 'joining tables'. Regrds KM On 7/22/06, Craig Hoffman <choffman@eclimb.net> wrote:
Hey there, I'm working on a menu system for a catering company. I'm having a difficult time sorting and grouping items together. For example, there may be three or four appetizers that should be group together. But I only want to display the category (appetizers) once and then the corresponding items (A, B, C,...). I'm drawing a blank on how to go about this. My DB consists of 4 tables (categories, items, item_attributes, menu) but the menu table is most the important. The menu schema is below. menu_id menu_name menu_category => pulls from the categories table (appetizers, starters, etc...) menu_item => pulls from the items table (Cherry Pie) menu_item_atttribute => pulls from the attribute table (Hot, cold, etc) Example: Menu Name: xxxxx Appetizers
        A
        B
        C
        D
Desserts
        A
        B
I'm open to all suggestions / ideas. Thanks - Craig -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#239697) next »