Skip to main content
Participant
November 13, 2009
Question

Help to display a Recordset field

  • November 13, 2009
  • 2 replies
  • 422 views

HI,

I have 2 sql tables 'activity' and 'rating' with a primary key of 'ratingID'.  I've created a dynamic data table on page in which I want to display a column for 'rating_descrip' gathered from the sql 'rating table'.   On the page table I've placed  {rsActivity.rating_descrip} in a column.  I've attached my 'test' page from the rsActivity which shows my 3 matching items culled from masterDB, but each shows all 4 rating descriptions (adult, child,family, teen), when each item has only one rating_descrip that matches its ratingID.

How do I enter a WHERE command or Variable to get just the matching rating_descrip to show?  Also attched my screen of advanced recordset.

This topic has been closed for replies.

2 replies

David_Powers
Inspiring
November 15, 2009

Marking this thread as assumed answered.

Participating Frequently
November 13, 2009

I don't understand. You mention two tables but your select statement only has the rating table. Did you mean to include items from activity also? If so, you need to add that and join the tables.

konasueAuthor
Participant
November 14, 2009

HI,

The activity table is also selected.  Everything in SELECT is from the 'activity' table, except the rating.rating_descrip -----

SELECT activityname, Type, Region, image, activityID, Price, activity.ratingID, rating.rating_descrip

I'm not sure what you by ' join' them?  I know that is what I need to do to get it to recognize the rating_descrip for a particular activty.  I've tried alot of different input into the recordset with no luck.  I get all the rating_descrip that are in the rating table.

****** I just got it!  I went back to the tutorial

Building a website with Web Premium CS4 – Part 10: Adding Ajax functionality with Spry

and found the 'join' command. I adapted it to my document and it now displays the correct records with the rating_descrip.  Unfortunately, a lot of this is trial an error for me now.  I hope it sticks.  But its also nice to know I have you guys out there to answer my questions.  Thanks,