Debug info: Unknown column 'coursecomp.cmid' in 'where clause'
|
SELECT COUNT(comp.id)
|
FROM mdl_competency_modulecomp coursemodulecomp
|
JOIN mdl_competency comp
|
ON coursecomp.competencyid = comp.id
|
WHERE coursecomp.cmid = ?
|
[array (
|
0 => '126',
|
)]
|
Error code: dmlreadexception
|
|
There is an error in SQL we should replace this code
$sql = 'SELECT COUNT(comp.id)
|
FROM {' . self::TABLE . '} coursemodulecomp
|
JOIN {' . competency::TABLE . '} comp
|
ON coursecomp.competencyid = comp.id
|
WHERE coursecomp.cmid = ? ';
|
By this code
$sql = 'SELECT COUNT(comp.id)
|
FROM {' . self::TABLE . '} coursemodulecomp
|
JOIN {' . competency::TABLE . '} comp
|
ON coursemodulecomp.competencyid = comp.id
|
WHERE coursemodulecomp.cmid = ? ';
|