The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
One last problem:(
I have fixed everything else, even Intvaling works
Now this code causes a "Resource id #13" error for the variable "$score" in this template: Code:
<b>The question ID is: </b><u>$theqid</u> <i>AND</i> the Score is <font color="FF0000">$score</font> ($answer), $ganswer, $ranswer, $sanswer & $hanswer Here is the PHP Code: PHP Code:
PHP Code:
I have attached a screenshot of the error itself Satan |
#2
|
||||
|
||||
look in your script, $score is a $DB_site-query result, nothing displayable
you should a) use query_first and then you have an array, so you have to use the right key |
#3
|
||||
|
||||
So you are saying:
PHP Code:
PHP Code:
Satan |
#4
|
|||
|
|||
Yes. That resource thing isn't an error, it's just the handle of the query, cast to a string.
|
#5
|
||||
|
||||
Ok
This 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), 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) Code:
$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]'"); } Satan |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|