Help With Code

Hello everyone,

I just started to learn OOP with PHP and I need to know what is wrong with this code please:

$testquestions = testquestions::model()->findAll(array('select'=>'*', 'condition'=>'test_id = :testid',  'params'=>array(':testid' => $testId),));

$testmodel = tests::model()->find(array('select'=>'*', 'condition'=>'test_id = :testId ', 'params'=>array(':testId' => $testId , ),));




I’m trying to get $question_points variable which is found in the column of the $testquestions table to go into the $possible_points variable which is a column in the $testmodel table.

Is the $testquestions->question_points calling the questions_points column and getting the value? if not, how do I do that?

Thank you!

[color="#008000"]/* Moved from "Bug Discussions" to "General Discussion for Yii 1.1.x" */[/color]

// $testquestions->question_points=$questionPoints;

$questionPoints = $testquestions->question_points;


Or, simply: