add param to valueset and valuesetdef

This commit is contained in:
mahdahar 2025-09-18 13:04:36 +07:00
parent 91e1404bcb
commit 8f30704a2b
5 changed files with 15 additions and 7 deletions

View File

@ -17,9 +17,13 @@ class ValueSet extends Controller {
}
public function index() {
$rows = $this->db->table('valueset')
->select("*")
->get()->getResultArray();
$builder = $this->db->table('valueset')->select("*");
$param = $this->request->getVar('param');
if ($param !== null) {
$builder->like('VValue', $param, 'both');
$builder->orlike('VDesc', $param, 'both');
}
$rows = $builder->get()->getResultArray();
if (empty($rows)) {
return $this->respond([

View File

@ -17,10 +17,14 @@ class ValueSetDef extends Controller {
}
public function index() {
$rows = $this->db->table('valuesetdef')
->select("*")
->get()->getResultArray();
$builder = $this->db->table('valuesetdef')->select("*");
$param = $this->request->getVar('param');
if ($param !== null) {
$builder->like('VSName', $param, 'both');
$builder->orlike('VSDesc', $param, 'both');
}
$rows = $builder->get()->getResultArray();
if (empty($rows)) {
return $this->respond([
'status' => 'success',

BIN
public/clqms01.sql.gz Normal file

Binary file not shown.

BIN
public/upload/meow.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
public/upload/panda.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB