Forums

This topic is locked

UD and dynamic links?

Posted 28 Aug 2001 11:25:58
1
has voted
28 Aug 2001 11:25:58 Paul Gannon posted:
Hi

Can anyone help me. I have a database which has two tables.

One table creates a table (a list using a repeat region) See test.compu-it.co.uk/compu-it/special_offers.asp to veiw the table.

I want each row in the table to be a Link to a dynamic page which is created by sending the ID as a parameter from the second databse table for example test.compu-it.co.uk/compu-it/course_overview.asp?id=2 - change the ID to 1 and it will display a different page.

If all of the data was in one database table with one ID I could possbibly do this, but I have two tables. The text which you see on the special_offers.asp is from one databse table and course_overiew.asp comes from another.

How do i tell UD to put the use the ID from correct row in the database

I am so confused, can anyone help me?

Mant Thanx

Paul

Replies

Replied 28 Aug 2001 12:52:26
28 Aug 2001 12:52:26 Owen Eastwick replied:
Paul,

Is there a relationship between the two tables? for instance SpecialOfferID = CourseOverviewID.

If so you can use the <b>Go To Detail Page</b> Using the SpecialOfferID as the unique identifier to pass to the overview page.

In the database create a Query from the two related tables, something like:

SELECT CourseOverview.CourseOverviewID, CourseOverview.Title, CourseOverview.Duration <b>etc...(basically select all the fields you are going to display on the Course_Overview page)</b>
FROM CourseOverview INNER JOIN SpecialOffers ON CourseOverview.CourseOverviewID = SpecialOffers.SpecialOffersID

Then on your course_overview page create a recordset from this Query using the parameter CourseOverViewID = Request.QueryString("id". You can do this bit in the Advanced view of the Recordset dialogue box. Take a look at my tutorial at:
www.tdsf.co.uk/tdsfdemo


<b>ALTERNATIVELY</b>

If there is no relationship between the two tables. You can set up the links manually. Highlight the text on the specail_offers page you want to be the link. Then in the Link text box of the Properties palette type in course_overview.asp?id=n, where n is the id for that particular offer. Do this for each item in the list.

Then create a recordset on the course_overview page from the CourseOverview table, once again using the parameter CourseOverViewID = Request.QueryString("id".

Hope that all makes sense.


Regards

Owen.

Replied 28 Aug 2001 16:41:14
28 Aug 2001 16:41:14 Paul Gannon replied:
Hi

Thanx fort the advice, I'll give it a go.

Paul

Replied 29 Aug 2001 14:22:19
29 Aug 2001 14:22:19 Davy Fennell replied:

I had a similar issue that I exhasted JMartinez over with a lengthy correspondence. It may be worth looking at our notes in the SQL forum under subject heading "help with SQL"

www.udzone.com/forum/topic.asp?TOPIC_ID=9419&FORUM_ID=13&CAT_ID=5&Topic_Title=help+with+SQL&Forum_Title=SQL


Reply to this topic