public function get_db_record() {
        global $DB;
        if ($record = $DB->get_record('course_categories', array('id' => $this->id))) {
            return $record;
        } else {
            return (object)convert_to_array($this);
        }
    }
public function get_db_record() {
        global $DB;
        if ($record = $DB->get_record('course_categories', array('id' => $this->id))) {
            return $record;
        } else {
            return (object)convert_to_array($this);
        }
    }
public function get_db_record ( ) { global $ DB ; if ( $ record = $ DB -> get_record ( 'course_categories' , array ( 'id' => $ this -> id ) ) ) { return $ record ; } else { return ( object ) convert_to_array ( $ this ) ; } }
Returns the complete corresponding record from DB table course_categories

Mostly used in deprecated functions

@return stdClass
Returns the complete corresponding record from DB table course_categories