best paractice example page creation php / mysql
| From: | Jon Bennett | Date: | Thu, 15 Jan 2004 18:23:51 +0000 |
| Subject: | best paractice example page creation php / mysql | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-174686@lists.php.net to get a copy of this message | ||
Hi,
One of the sections in the site I'm developing is a training section. Within this section there are sub sections which each need the option of having multiple examples added. Each example will be made up of 2 sections a UL list and a 2 column table with a title and intro as well.
The way I was thinking of doing this was to have 3 tables:
training_subsections
training_list_items
training_table_items
Then once a training sub section has been added into the system they can then add example pages. With this current setup I was thinking I'd ask the user how many list items and how many table items they want for this item (I will add the option to add more at a later date if nessecary) and then build the form on the fly from these 2 figures.
My problem is, is it a 'reccomended' way of doing things to query the db multiple times for each new list_item and table_item in one go ??? I could just have an examples table with say 10 list_item columns and 10 x 2 table columns but that seems like a short cut really and leaves no room for scaleability.
Any thoughts ??
Thanks,
Jon
jon bennett | jon@jben.net
new media creative
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
J b e n . n e t
91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD
t: +44 (0) 1225 341039 w: http://www.jben.net/