Chris M
06-12-2003, 07:22 PM
The score grabbing works, but now I need the the values in the "gscore,sscore,hscore and rscore" fields;)
So far, they return:
gscore
sscore
hscore
rscore
I am not sure what type of field they should be (I have them set as VARCHAR:confused:), and they are a point value, with gscore being 4 and sscore being 1...
This code is what needs to be modified to get the value (everything else works:D):)
$score = $DB_site->query_first("SELECT '$whichscore' FROM *tablename*_questions WHERE qid='$theqid'");
if ($bbuserinfo['usergroupid']==2)
{
$DB_site->query("UPDATE user SET question1='$theqid',score1='$score[$whichscore]' WHERE userid='$bbuserinfo[userid]'");
}
Any help?:)
Satan
So far, they return:
gscore
sscore
hscore
rscore
I am not sure what type of field they should be (I have them set as VARCHAR:confused:), and they are a point value, with gscore being 4 and sscore being 1...
This code is what needs to be modified to get the value (everything else works:D):)
$score = $DB_site->query_first("SELECT '$whichscore' FROM *tablename*_questions WHERE qid='$theqid'");
if ($bbuserinfo['usergroupid']==2)
{
$DB_site->query("UPDATE user SET question1='$theqid',score1='$score[$whichscore]' WHERE userid='$bbuserinfo[userid]'");
}
Any help?:)
Satan