Advertisement
Advertisement
| 07.31.2008 at 01:13PM PDT, ID: 23612309 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: |
<!---- loop through the URL and collect up IDs into one variable as a list 1,2,3... ----->
<cfset IDs = "">
<cfloop index="ik" from="1" to="3">
<cfif isDefined("url.ID"&ik)> <!--- does it exist and have a value > 0 ? ---->
<cfset IDs = listAppend(IDs,url['ID'&ik])> <!--- append to the list ---->
</cfif>
</cfloop>
<cfquery name="getSub" datasource="#dssource#">
SELECT cnum, IID, sf1, sl1, ID
FROM ib_c
where ib_c.cnum = <cfqueryparam value="#URL.cno#" cfsqltype="cf_sql_integer">
<cfif len(IDs)>
and ib_c.IID in (<cfqueryparam cfsqltype="cf_sql_varchar" list="Yes" value="#IDs#">)
<cfelse> <!--- no ids found, so return nothing ---->
and 1=2
</cfif>
ORDER BY IID
</cfquery>
<!---- create a list of IDs fetched from the database into one variable ----->
<cfset databaseIDs = valueList(getSchool.IID)>
<!--- <cfoutput>The IDs from the database: #databaseIDs#</cfoutput><br> --->
<cfset listNotFound = "" />
<!--- loop through IDs from the URL and see if they were fetched from the database ----->
<cfloop index="theIID" list="#IDs#">
<cfif listFindNoCase(databaseIDs,theIID) eq 0> <!---- is ID found in the database? ----->
<cfset listNotFound = listAppend(listNotFound, theIID) />
<!--- ID #theIID# is not in the database.<br> --->
</cfif>
</cfloop>
<!--- group all id's for cookie --->
<cfset IDs = "">
<cfloop index="i" from="1" to="3">
<cfif IsDefined("url.id"&i)>
<cfset intID = Evaluate("url.id"&i)>
<cfset intID = REReplace(intID, "[^0-9]", "", "all")>
<cfif intID NEQ "">
<cfif getSchool.recordcount GT 0>
<cfquery name="GetChild" datasource="#dssource#">
select * from ib_c where ID = #intID#
</cfquery>
<cfelse>
</cfif>
<cfif getSchool.recordcount GT 0>
<cfloop query="GetChild">
<cfcookie name="cnum" value="#GetChild.cnum#">
<cfset IDs = ListAppend(IDs, intID)>
</cfloop>
<cfelse>
<cfset IDs = ListAppend(IDs, intID)>
</cfif>
</cfif>
</cfif>
</cfloop>
<!--- group all sn's --->
<cfset SNs = "">
<cfloop index="i" from="1" to="3">
<cfif IsDefined("url.sn"&i)>
<cfset intSN = Evaluate("url.sn"&i)>
<cfif intSN NEQ "">
<cfif getSchool.recordcount GT 0>
<!--- Error is here---> <cfquery name="GetChildSN" datasource="#dssource#">
select * from ib_c where ID = #intID#
</cfquery>
<cfelse>
</cfif>
<cfif getSchool.recordcount GT 0>
<cfloop query="GetChildSN">
<cfset SNs = ListAppend(SNs, intSN)>
</cfloop>
<cfelse>
<cfset SNs = ListAppend(SNs, intSN)>
</cfif>
</cfif>
</cfif>
</cfloop>
<cfset myarray=ListToArray(#listNotFound#, ",")>
<cfset myList = ArrayToList(myArray, ",")>
<!--- output the array as a list --->
<cfset myarray=ListToArray(#CGI.QUERY_STRING#, "&")>
<cfloop index="ax" from="1" to="#ArrayLen(myarray)#">
<!--- <cfoutput>#myarray[ax]#</cfoutput> --->
<cfset variable=#ListToArray(#myarray[ax]#,"=")#>
</cfloop>
<cfset cnum = url.cno>
<cfset fn1 = left(sn1,1)>
<cfset ln1 = mid(sn1,2,len(sn1))>
<cfset fn2 = left(sn2,1)>
<cfset ln2 = mid(sn2,2,len(sn2))>
<cfset fn3 = left(sn3,1)>
<cfset ln3 = mid(sn3,2,len(sn3))>
<cfif listFindNoCase(databaseIDs,id1) eq 0>
<cfset intID = REReplace(id1, "[^0-9]", "", "all")>
<cfif IsDefined("#id1#") AND id1 EQ GetChild.IID>
<cfelse>
<cfquery name="AddStudent1" datasource="#dssource#">
INSERT INTO ib_c (cnum, ID, IID, parent_email,
parent_first, parent_last, sf1, student_grade1, sl1, reason)
VALUES ('#cnum#', '#intID#', '#id1#','email','pfirst', 'plast','#fn1#', '0', '#ln1#','')
</cfquery>
</cfif>
<cfelse>
</cfif>
<cfif listFindNoCase(databaseIDs,id2) eq 0>
<cfset intID = REReplace(id2, "[^0-9]", "", "all")>
<cfif IsDefined("#id2#") AND id2 EQ GetChild.IID>
<cfelse>
<cfquery name="AddStudent2" datasource="#dssource#">
INSERT INTO ib_c (cnum, ID, IID, parent_email,
parent_first, parent_last, sf1, student_grade1, sl1, reason)
VALUES ('#cnum#', '#intID#', '#id2#','email','pfirst', 'plast','#fn2#', '0', '#ln2#','')
</cfquery>
</cfif>
<cfelse>
</cfif><cfif listFindNoCase(databaseIDs,id3) eq 0>
<cfset intID = REReplace(id3, "[^0-9]", "", "all")>
<cfif IsDefined("#id3#") AND id3 EQ GetChild.IID>
<cfelse>
<cfquery name="AddStudent3" datasource="#dssource#">
INSERT INTO ib_c (cnum, ID, IID, parent_email,
parent_first, parent_last, sf1, student_grade1, sl1, reason)
VALUES ('#cnum#', '#intID#', '#id3#','email','pfirst', 'plast','#fn3#', '0', '#ln3#','')
</cfquery>
</cfif>
<cfelse>
</cfif>
|