| Index
» Projekty
» phpMyEdit
» Fórum
» Updating data in multiple tables |
 |
bp
Založený: 03.04.2009
Príspevky: 4
Zaslal: 2009-04-03 00:30
Návrat hore
Odpovedať s citátom
|
Hi everyone,
I've gotten myself in way over my head, and I'm stuck. Hoping for some help. :) I've spent hours trying to figure this out! I am dealing with 2 tables.
PressReleases - has 2 fields: id and headline.
Event - has 2 fields: id and date.
An item in PressReleases can either have an event associated with it or not. The id field ties the 2 together.
What I want to do is use a data entry form that has 3 fields: id, headline, and date. ID and headline are required, where date is not. When the user adds a new record, or updates an existing record, I want the id and headline to be updated in PressReleases. If there is a date entered, I additionally want the id and the date to be updated in Event.
Is this possible to do? Thank you guys for your help! Great product!
|
bp
Založený: 03.04.2009
Príspevky: 4
Zaslal: 2009-04-03 00:32
Návrat hore
Odpovedať s citátom
|
Sorry - let me add one more piece of information. A press release can have ZERO OR MANY events associated with it. That's why there is a separate table for events. Otherwise, I'd just have a date field in the PressReleases table. :)
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|