public static function delete_comments($param) {
        global $DB;
        $param = (array)$param;
        if (empty($param['contextid'])) {
            return false;
        }
        $DB->delete_records('comments', $param);
        return true;
    }
public static function delete_comments($param) {
        global $DB;
        $param = (array)$param;
        if (empty($param['contextid'])) {
            return false;
        }
        $DB->delete_records('comments', $param);
        return true;
    }
public static function delete_comments ( $ param ) { global $ DB ; $ param = ( array ) $ param ; if ( empty ( $ param [ 'contextid' ] ) ) { return false ; } $ DB -> delete_records ( 'comments' , $ param ) ; return true ; }
delete by context, commentarea and itemid
@param stdClass|array $param {
contextid => int the context in which the comments exist [required]
commentarea => string the comment area [optional]
itemid => int comment itemid [optional]
}
@return boolean
delete by context commentarea and itemid