--- ../lib.php Fri Jun 1 10:34:13 2012 +++ lib.php Fri Jun 1 10:35:15 2012 @@ -490,7 +490,7 @@ function pcast_scale_used_anywhere($scaleid) { global $DB; - if ($scaleid and $DB->record_exists('pcast', array("scale", "-$scaleid"))) { + if ($scaleid and $DB->record_exists('pcast', array("scale" => "-$scaleid"))) { return true; } else { return false;