public static function add_type($type) { DB::insert(DB::table('commenttype'), array('name' => $type, 'active' => 1)); return DB::last_insert_id(); }