Hi everyone,
I have query(s) that I need to perform which I couldn't figure out, and following is the situation
I have event table (which stores the event details) that has eid, date, time, place field, etc.
I have a member table (which stores who join which event) that has the same field eid as event table but with other member information fields.
When a member join an event, I want to check if he has already joined another event with the same date, and time in the member table. The only reference is the eid that refers back to the event table's content of time and date
The logic is he couldn't be at the different place at the same time
How am I going to construct the qurey or need more than one query to finish my task. I want to return boolean result. If the result is true, I don't allow the member to join that event and give him a warning.
The only common data both tables holds is eid and I couldn't figure out how I could accomplish my task
I could have add date and time field to the member table but I think I still have to pull out the date and time information from the event table (the event in question) and compare if there is an exist record that carries the same date and time. but I wonder if I could do it without alter any table fields.
Thanks in advance
I have query(s) that I need to perform which I couldn't figure out, and following is the situation
I have event table (which stores the event details) that has eid, date, time, place field, etc.
I have a member table (which stores who join which event) that has the same field eid as event table but with other member information fields.
When a member join an event, I want to check if he has already joined another event with the same date, and time in the member table. The only reference is the eid that refers back to the event table's content of time and date
The logic is he couldn't be at the different place at the same time
How am I going to construct the qurey or need more than one query to finish my task. I want to return boolean result. If the result is true, I don't allow the member to join that event and give him a warning.
The only common data both tables holds is eid and I couldn't figure out how I could accomplish my task
I could have add date and time field to the member table but I think I still have to pull out the date and time information from the event table (the event in question) and compare if there is an exist record that carries the same date and time. but I wonder if I could do it without alter any table fields.
Thanks in advance
Comment