Hello guys,
I spent a little time on these boards the other day asking some questions on some rather complicated joins, and fortunately Mindaugas Jack?nas was kind enough to give me a helping hand in writing them.
I’m now slightly further on in the project and have another monster relation to construct and it’s a little above my head so I’m again looking for some information. I’ll start by explaining the database I’ve currently got running, then look at explaining what I need the query to return.
To start with I have several tables (tblMember, tblMessages, tblMessageOwners, tblCampaigns, tblShedules, tblMessageCampSchedule)
I’m not sure I have the database designed in the best way to achieve this but I’m hoping I’ve at least got something close, but it’s easy enough to modify as I don’t current have any content in it.
So, now I’ll explain what I’m trying to achieve;
Each Member can own many messages, and a message can be owned by several members. A member can own many campaigns and a campaign can be owned by 1 member. Each message can belong to many campaigns and each campaign can contain many messages. Each message can have many schedules but they are dependant upon which campaign it is in.
So the final result would be that a user can have lots of messages that they can add to different campaigns, and then schedule different dates for a message in each campaign.
Now I’m looking for the query to return a list off all the messages owned by a member, and organise them into their different campaigns and attach the relevant schedule to a message dependant on its campaign.
I’m quite happy grouping the output with ColdFusion, but it is quite a large query for me to get my noggin round, so any help you guys can pass my way would be more than appreciated.
Let me know if you need any more information on this and I’ll get it to you right away.
Thanks,
Rob
I spent a little time on these boards the other day asking some questions on some rather complicated joins, and fortunately Mindaugas Jack?nas was kind enough to give me a helping hand in writing them.
I’m now slightly further on in the project and have another monster relation to construct and it’s a little above my head so I’m again looking for some information. I’ll start by explaining the database I’ve currently got running, then look at explaining what I need the query to return.
To start with I have several tables (tblMember, tblMessages, tblMessageOwners, tblCampaigns, tblShedules, tblMessageCampSchedule)
I’m not sure I have the database designed in the best way to achieve this but I’m hoping I’ve at least got something close, but it’s easy enough to modify as I don’t current have any content in it.
So, now I’ll explain what I’m trying to achieve;
Each Member can own many messages, and a message can be owned by several members. A member can own many campaigns and a campaign can be owned by 1 member. Each message can belong to many campaigns and each campaign can contain many messages. Each message can have many schedules but they are dependant upon which campaign it is in.
So the final result would be that a user can have lots of messages that they can add to different campaigns, and then schedule different dates for a message in each campaign.
Now I’m looking for the query to return a list off all the messages owned by a member, and organise them into their different campaigns and attach the relevant schedule to a message dependant on its campaign.
I’m quite happy grouping the output with ColdFusion, but it is quite a large query for me to get my noggin round, so any help you guys can pass my way would be more than appreciated.
Let me know if you need any more information on this and I’ll get it to you right away.
Thanks,
Rob