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 , ),));
$testquestions->question_points=$questionPoints;
$testmodel->possible_points=$questionPoints;
$testmodel->save();
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!