samani
Member
hi..
i have this code in my calc element:
$myDb = FabrikWorker::getDbo(false, 2);
// now it's just standard J! database API stuff, and probably some Fabrik placeholders
//$something = '{yourtable___something}';
$myQuery = $myDb->getQuery(true);
$myQuery->select('COUNT(id)')->from('mdl_question_attempt_steps')->where('userid = "9311" ');
$myDb->setQuery($myQuery);
dump ($myDb->loadResult(),"loadResult");
return $myDb->loadResult();
but dump show me it run 3 time and also my result is *3
foe example my original result of my query is 60 but this Calc element is return 180.
how to solve that?
thank you...
i have this code in my calc element:
$myDb = FabrikWorker::getDbo(false, 2);
// now it's just standard J! database API stuff, and probably some Fabrik placeholders
//$something = '{yourtable___something}';
$myQuery = $myDb->getQuery(true);
$myQuery->select('COUNT(id)')->from('mdl_question_attempt_steps')->where('userid = "9311" ');
$myDb->setQuery($myQuery);
dump ($myDb->loadResult(),"loadResult");
return $myDb->loadResult();
but dump show me it run 3 time and also my result is *3
foe example my original result of my query is 60 but this Calc element is return 180.
how to solve that?
thank you...