<?php
namespace App\Models\common;

use CodeIgniter\Model;

class CommonModel extends Model
{
    public function getVrfcCode($type)
    {

        $sql = "SELECT category, category_nm, cd, cd_nm FROM codes" .
            " WHERE category = ?" .
            " AND use_yn = 'Y'" .
            " ORDER BY view_odr";

        $query = $this->db->query($sql, [$type]);

        return $query->getResultArray();
    }
}