Skip to main content
Known Participant
February 12, 2007
Question

Insert several dates for the same event

  • February 12, 2007
  • 17 replies
  • 1403 views
Hey guys,

I have two tables joined. 1 with dates and venue, the other with speakers.

How can I add more dates to the same speaker during his programme of appearance. i.e. Speaker A will be appearing for the following dates: 20/02/2007 - 27/02/2007 & 5/03/2007.....

I was thinking of a Date fiels and a dropdown dynamic field. But I'm having problems figuring it out...

Any help would be very much appreciated..

Thanks
    This topic has been closed for replies.

    17 replies

    Bob-ElAuthor
    Known Participant
    February 16, 2007
    Sabaidee, Many thanks for all your help.

    I guess my problem was in the table structure like you said. I will definetely give it a go.

    Thank you
    Rob
    Inspiring
    February 16, 2007
    ok, i am back in the office again...

    now, let's see... the form you posted the code for only enters a new date/speaker choice for selected venue. so i believe you must have some other form which inserts new speakers into the db... and you surely have a textarea on that one to enter the review... so what is the problem then? if the review does not change with every new date you enter, why do you need it in the same query?

    i do not know what your database structure is, but from what code you have posted i guess it is not normalized... off the topic, but on the same subject, here's the db structure i suggest for you:

    1) tblVenues {venueID (PK), venueName}
    2) tblSpeakers {speakerID (PK), speakerName, speakerDescription}
    3) tblVenuesDates {venuedateID (PK), venueID, date}
    4) tblAppearances {appearanceID (PK), venuedateID, speakerID}

    PK = primary key
    fields with same names in different tables are fields those tables are linked on.

    this setup will allow you to easily add new venues, dates, speakers and speaker appearances. even though right now you may have only 2 venues, who knows what will happen next month? maybe 2 more will be added... then instead of changing html in your pages, all you will have to do is add new venues into the db.
    Bob-ElAuthor
    Known Participant
    February 15, 2007
    Hi Sabaidee,

    Many thanks in advance for all your help.

    The description of every speaker is the same throughout. Does not change at all..

    Thanks
    Rob
    Inspiring
    February 15, 2007
    and this speaker description, is it unique to a speaker or to a venue/date combination? does it change with each date/venue or is it always the same for a given speaker?
    Bob-ElAuthor
    Known Participant
    February 15, 2007
    The project is as follows:
    I get handed a program list of who's appearing in each venue during each month. The program consists of Speakers, dates of appearance, and the venue they would appear in, all on a piece of paper. Now I have to add them all to the database. But some of those speakers appear in more than one given dates, i.e three times a month in the same venue. There are no conditionals required, i.e if they are pre-booked for another venue..

    For every speaker there is a small review/description about them. So instead of entering all details every time I'm inputting the monthly program, I'd like to be able to update the dates with the speakerName, and within the query, somehow the description would be pulled as well.

    Hope it's a bit clearer now...

    Thanks
    Rob
    Inspiring
    February 15, 2007
    i am sorry, but i still do not quiet understand your requirements...

    the form code you posted previously lets a user enter a date, select a venue and select a speaker and then inserts this into the speaker table. (btw, what if the speaker is already booked for another venue for the same date? your code does not check for that... )

    so where does the speaker's profile come into this? where is this hyperlink on the speakername?

    and what do you mean by "I'd love to just update the dates and with it, their profile gets updated as well"? is this some other page/form you are talking about?

    please clarify all the above.
    Bob-ElAuthor
    Known Participant
    February 15, 2007
    Many thanks in advance guys.

    Sabaidee, you're correct on the review field that stores the speaker description..

    I have a page that pulls the dates, venue and speakers' name from the database. The speakerName is hyperlinked to a detail page that shows his profile / description. The problem is these speakers do multi appearances, so I'd love to just update the dates and with it, their profile gets updated as well.

    Thank
    Rob
    Inspiring
    February 15, 2007
    i agree with Dan - you should have stuck with separate speakers and venues and dates tables... anyway... so, you still haven't clearly confirmed that review is the field that stores the speaker description. i will assume it is. where exactly and how do you want to display that info in your form?

    Inspiring
    February 15, 2007
    Your first design was better. If you need to store more information than those two tables accomodate, add more tables.
    Bob-ElAuthor
    Known Participant
    February 15, 2007
    Sorry Sabaidee,

    I had to change the tables around since the first one wasn't accommodating all the info that was required. But the purpose is still the same. two tables, Speaker one includes, speakerID, speakerName, venue & eventDate... And the review table includes, reviewID, speakerID & review....

    Terribly sorry for the confusion...