Forums
This topic is locked
Passing A Variable?
Posted 19 years ago
1
has voted
19 years ago Jim Thomas posted:
What I have is a novelty company that runs contests, tournaments and live events. All of these are stored into a table named "Events". On the site I have these same pages and filter the results that populate the page by a field called "type" that holds the information if the event is a tournament, contest or live. In another table I have named "locations" along with the name and geographic location I have the information stored there as to who participates in dart, pool, golden tee and so on. What I want somebody to be able to do is view an events ( contest, tournament, live ) page and be able to click a link that would show them all the locations that participate in that type of event.I have used the go to detail and go to related page behavours but can not get the resulting page to filter the records by the desired criteria. In fact Im geting no results at all. Any help would be appreciated. Thank You
Replies
Replied 19 years ago
19 years ago Simon Martin replied:
Hi Jim
Sounds to me like the problem is that there is no relationship between an event and a location.
What I would suggest is that you create a new table in your database tbl_event_location, this table will then hold the primary keys from the other 2 tables thus building your relationships, also consider adding a date / time field and maybe flags to say whether it is currently active or not. You can't go directly between the 2 tables as this would result in a Many-Many relationship i.e. an event can have many locations (over time) and a location can have many events.
Then to populate your pages you'll need to join the tables together via the linking table. If you need help on how to do joins shout back and we'll do our best to help you figure it out
HTH
Live the life you love
Love the life you live
~ ~ ~ ~ ~ ~ ~
<b>Simon Martin</b> - <i>DMXzone Manager</i>
<font size=1>[ Dreamweaver MX/MX2004 | ASP | SQL | XHTML/CSS | Web Accessibility ] </font id=size1>
Sounds to me like the problem is that there is no relationship between an event and a location.
What I would suggest is that you create a new table in your database tbl_event_location, this table will then hold the primary keys from the other 2 tables thus building your relationships, also consider adding a date / time field and maybe flags to say whether it is currently active or not. You can't go directly between the 2 tables as this would result in a Many-Many relationship i.e. an event can have many locations (over time) and a location can have many events.
Then to populate your pages you'll need to join the tables together via the linking table. If you need help on how to do joins shout back and we'll do our best to help you figure it out
HTH
Live the life you love
Love the life you live
~ ~ ~ ~ ~ ~ ~
<b>Simon Martin</b> - <i>DMXzone Manager</i>
<font size=1>[ Dreamweaver MX/MX2004 | ASP | SQL | XHTML/CSS | Web Accessibility ] </font id=size1>
Replied 19 years ago
19 years ago Jim Thomas replied:
Hi Simon,
First, I want to thank you so much for taking the time to reply. I am just learning all about this on my own and find it all facinating, but get stuck some times.
I actually did get this up and running with the help of a local friend. What he did was use a unique identifier in the "events" table that got passed over to the "locations" table to filter the recordset by something called MM_ColParam(?). It worked right off the bat.
Thank you again though for your time, I sincerely appreciate it.
First, I want to thank you so much for taking the time to reply. I am just learning all about this on my own and find it all facinating, but get stuck some times.
I actually did get this up and running with the help of a local friend. What he did was use a unique identifier in the "events" table that got passed over to the "locations" table to filter the recordset by something called MM_ColParam(?). It worked right off the bat.
Thank you again though for your time, I sincerely appreciate it.