Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Help to display a Recordset field

New Here ,
Nov 13, 2009 Nov 13, 2009

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.

TOPICS
Server side applications
422
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 13, 2009 Nov 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 13, 2009 Nov 13, 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,

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 15, 2009 Nov 15, 2009
LATEST

Marking this thread as assumed answered.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines