See if any of your data has a single quote (') or period (.).  I ran into
the same problem filling it with country, state, city.  A number of cities
had one or the other, as soon as I removed all quotes and periods, problem
solved.

Christian

-----Original Message-----
From: Janine Jakim [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 26, 2001 12:34 PM
To: CF-Talk
Subject: help with selectthreerelated


I'm using the custom tag <CF_ThreeSelectsRelated> and can't get it to work
completely.  I can get the first two to drill down, but when I code in for
the 3rd box I get no results... the form comes up with all the labels etc,
but no data.  Sooo somehow I am not properly passing the variable....or
something....and I think I've been staring at it way too long.  
This is the query that makes the 3 select boxes....This is where I assume
the problem lies although I added the queries from my action page also...
Any help would be wonderful. Thanks,
j

<CFQUERY NAME="GetGradeTeacher" DATASOURCE="#dsn#">
SELECT AM.CRSTITLE, AS.GRADE,  
AS.LASTNAME, AS.FIRSTNAME, 
AS.GENDER, AC.CLASSLINK, 
AC.SCHOOLNUM, AC.TeachType, AS.PERMNUM, User.ULastName, User.UFirstName 
FROM AM INNER JOIN ((Users INNER JOIN AC
ON User.CLASSLINK = AC.CLASSLINK) INNER JOIN 
AS ON AC.PERMNUM = AS.PERMNUM)
ON (AM.SCHOOLNUM = AC.SCHOOLNUM) AND 
(AM.CLASSLINK = AC.CLASSLINK)
WHERE (((AC.TeachType) = 'H'))
AND AC.SCHOOLNUM=#CLIENT.SCHOOLNUM#
AND AM.TCHNUM=Users.TCHNUM  AND AC.CLASSLINK=AM.CLASSLINK
AND AC.PERMNUM =AS.PERMNUM
ORDER BY AS.GRADE, User.ULastName, 
AS.LASTNAME
</CFQUERY>

<!-------------This code sets my values/gives names for the
variables------------>
NAME1="GRADE1"
NAME2="CLASSLINK1"
NAME3="NAME"
VALUE1="GRADE"
VALUE2="CLASSLINK"
VALUE3="PERMNUM"

<!-------------This is the query that processes the info....------------>
<CFPARAM NAME="GRADE" DEFAULT="">
<CFPARAM NAME="CLASSLINK1" DEFAULT="">
<CFPARAM NAME="NAME" DEFAULT="">
<CFQUERY NAME="StudentGrade" DATASOURCE="#dsn#">
SELECT cs.Skill, AS.GRADE, 
AC.CLASSLINK, AS.PERMNUM, AS.LASTNAME, 
AS.FIRSTNAME, cs.Skill, Grade.GradeForSubject, 
Grade.SkillID, Grade.GradingPeriod, AC.TeachType, 
cs.CourseID, cs.GradeLevel 
FROM ((AS INNER JOIN Grade ON 
AS.PERMNUM = Grade.PERMNUM) INNER JOIN tbl_cs ON 
Grade.SkillID = cs.SkillID) INNER JOIN AC ON 
AS.PERMNUM = AC.PERMNUM
WHERE AC.SCHOOLNUM=#CLIENT.SCHOOLNUM# AND 
 AC.TeachType='H' 
AND 
AS.GRADE='#Trim(Attributes.GRADE1)#' AND
AC.CLASSLINK=#VAL(attributes.CLASSLINK1)#
AND AS.PERM='#trim(Attributes.NAME)#'
ORDER BY AS.GRADE, AC.CLASSLINK, AS.LASTNAME, AS.FIRSTNAME, Grade.SkillID
</CFQUERY>

<!---Gets the course information---->
<CFSET NCourseID=Grade.CourseID>
<CFQUERY NAME="GetSkill" DATASOURCE="#dsn#">
SELECT SkillID, Skill, el.CourseID
FROM tbl_CourseSkill, el
WHERE el.CourseID =#CourseID#
AND GradeLevel='#GradeLevel#'
ORDER BY SkillID

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to