ckroon
Posts: 869
|
| Posted: 07/01/2008, 1:34 AM |
|
I have a grid (Grid A) that displays courses a student is enrolled in. You click the link next to the course and it opens a record for where you then enter a grade for that course.
Next to the course name in Grid A I want to place a label that shows the grade of that course. The teacher will be able to see what grades have been entered and which ones have not.
I figured the easiest way would be via a CCDLookup but I needed to add some parameters to it.
On the row I have a hidden field populating with the 'assignment' ID.
On the Before Show Row event of Grid A i did a CCGetValue of that label and called it $check.
This is the CCDlookup I came up with but it does not work. It seems to ignore the AND parameters.
CCDLookUp("gmc_progress1","transcript_current","gmc_studentid=".CCGetFromGet("sid",0) AND "gmc_term=".CCGetFromGet("t","") AND "gmc_assignid=$check",$DBConnection1));
Am I even on the right track? Is it possible to do multiple params with a CCDLookup?
nothing in the docs or the forums told me either way....
Thanks!
_________________
Walter Kempees...you are dearly missed. |
 |
 |
datadoit
|
| Posted: 07/01/2008, 5:31 AM |
|
Try:
$db = new DBConnection1();
CCDLookUp("gmc_progress1", "transcript_current", "gmc_studentid=" .
$db->ToSQL(CCGetFromGet("sid",0), ccsInteger) . " AND gmc_term=" .
$db->ToSQL(CCGetFromGet("t",""), ccsText) . " AND gmc_assignid=" .
$db->ToSQL($check, ccsInteger), $db);
$db->close();
|
|
|
 |
wkempees
Posts: 1679
|
| Posted: 07/01/2008, 8:48 AM |
|
CCDLookUp('gmc_progress1', 'transcript_current','gmc_studentid='.CCGetFromGet("sid",0) .' AND gmc_term='.CCGetFromGet("t","") .' AND gmc_assignid=' . $check ,$DBConnection1));
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
ckroon
Posts: 869
|
| Posted: 07/01/2008, 10:15 AM |
|
Thanks Gentlemen!
_________________
Walter Kempees...you are dearly missed. |
 |
 |
jjrjr1
Posts: 942
|
| Posted: 07/01/2008, 4:16 PM |
|
Hi
Another way to try it might be like CCS does it for login in the Common.php script.
Like So.
$db2 = new clsDBMobiGolf();
$SQL = "SELECT vou_idkey, vou_valid, vou_transkey, vou_type FROM mg_voucher WHERE vou_idkey=" . $db2->ToSQL($login, ccsText);
$db2->query($SQL);
$Result = $db2->next_record();
$logperm = $db2->f("vou_valid");
$tlogin=$db2->f("vou_idkey");
$ttype=$db2->f("vou_type");
$transkey=$db2->f("vou_transkey");
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
jjrjr1
Posts: 942
|
| Posted: 07/01/2008, 4:19 PM |
|
Or Like This
$db = new clsDBMobiGolf();
$SQL = "SELECT usr_seq, usr_id, usr_priv, usr_pw, usr_fname, usr_lname FROM mg_users WHERE usr_id=" . $db->ToSQL($login, ccsText) . " AND usr_pw=" . $db->ToSQL($password, ccsText);
$db->query($SQL);
$Result = $db->next_record();
$logperm = $db->f("usr_priv");
$tlogin= $db->f("usr_id");
$fname= $db->f("usr_fname");
$lname= $db->f("usr_lname");
$JRusrseq = $db->f("usr_seq");
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
|