MySQL Forums
Forum List  »  Newbie

database design problem
Posted by: Paul Campbell
Date: May 12, 2005 08:13PM

I am having difficulty designing a database for a given problem.

The problem is, my client wants an info table showing 31 days from the current day with specials for 4 or 5 items displayed in each field of each day. I have to insert the result into a formatted table within a value box so they can update eacheach result into eg

Date Item1 Item2 Item 3 Item4
Today S Price S Price S Price S Price
Today+1 S Price S Price S Price S Price
Today+2 S Price S Price S Price S Price

etc etc etc

I have created loops to make input boxes for any number of rows but I am having trouble filling those rows up with the correct data. The main problem I have is if I try to make the table with a mysql query if they show up to modify or add stuff on the next day they will have one less row in their table as today moves forward by one. I am currently creating a 60 row input form and I am trying to populate the correct column/rows with the correct data. The tables I am accessing are something like this

items

item_id
item_description
item_full_price

specials

specials_id autoinc
specitem_id foreign key of item_id
special_price
date_of_special DATE field

Any ideas or a shove in the right direction would be appreciated

Thanks in advance

PS I hope I can be of help to someone in the future as I learn more about MySQL.

Options: ReplyQuote


Subject
Written By
Posted
database design problem
May 12, 2005 08:13PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.